From ab57ee42cb5dadf0f24d84873a9bab65bdf46a06 Mon Sep 17 00:00:00 2001 From: X512 Date: Fri, 4 Dec 2020 22:54:37 +0900 Subject: [PATCH] fix build after MethodDeleter interface change Change-Id: Iadb9e37772fd6588636085944c1455249ac0f926 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3457 Reviewed-by: Adrien Destugues --- .../kernel/file_systems/ext2/kernel_interface.cpp | 2 +- .../file_systems/packagefs/package/PackageFile.cpp | 4 ++-- src/system/kernel/device_manager/device_manager.cpp | 9 +++------ src/system/kernel/vm/vm_page.cpp | 2 +- src/system/libroot/os/find_paths.cpp | 12 ++++++------ 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/add-ons/kernel/file_systems/ext2/kernel_interface.cpp b/src/add-ons/kernel/file_systems/ext2/kernel_interface.cpp index 942cb5f754..7f3b1397c5 100644 --- a/src/add-ons/kernel/file_systems/ext2/kernel_interface.cpp +++ b/src/add-ons/kernel/file_systems/ext2/kernel_interface.cpp @@ -1190,7 +1190,7 @@ ext2_open(fs_volume* _volume, fs_vnode* _node, int openMode, void** _cookie) cookie->last_size = inode->Size(); cookie->last_notification = system_time(); - MethodDeleter fileCacheEnabler(&Inode::EnableFileCache); + MethodDeleter fileCacheEnabler; if ((openMode & O_NOCACHE) != 0) { status = inode->DisableFileCache(); if (status != B_OK) diff --git a/src/add-ons/kernel/file_systems/packagefs/package/PackageFile.cpp b/src/add-ons/kernel/file_systems/packagefs/package/PackageFile.cpp index 477c955445..62aed472d2 100644 --- a/src/add-ons/kernel/file_systems/packagefs/package/PackageFile.cpp +++ b/src/add-ons/kernel/file_systems/packagefs/package/PackageFile.cpp @@ -148,8 +148,8 @@ PackageFile::VFSInit(dev_t deviceID, ino_t nodeID) status_t error = PackageNode::VFSInit(deviceID, nodeID); if (error != B_OK) return error; - MethodDeleter baseClassUninit(this, - &PackageNode::NonVirtualVFSUninit); + MethodDeleter + baseClassUninit(this); // open the package -- that's already done by PackageNode::VFSInit(), so it // shouldn't fail here. We only need to do it again, since we need the FD. diff --git a/src/system/kernel/device_manager/device_manager.cpp b/src/system/kernel/device_manager/device_manager.cpp index 00d035a41d..e8bb4c2eec 100644 --- a/src/system/kernel/device_manager/device_manager.cpp +++ b/src/system/kernel/device_manager/device_manager.cpp @@ -1955,8 +1955,7 @@ device_node::Probe(const char* devicePath, uint32 updateCycle) if (status < B_OK) return status; - MethodDeleter uninit(this, - &device_node::UninitDriver); + MethodDeleter uninit(this); if ((fFlags & B_FIND_CHILD_ON_DEMAND) != 0) { bool matches = false; @@ -2026,8 +2025,7 @@ device_node::Reprobe() if (status < B_OK) return status; - MethodDeleter uninit(this, - &device_node::UninitDriver); + MethodDeleter uninit(this); // If this child has been probed already, probe it again status = _Probe(); @@ -2054,8 +2052,7 @@ device_node::Rescan() if (status < B_OK) return status; - MethodDeleter uninit(this, - &device_node::UninitDriver); + MethodDeleter uninit(this); if (DriverModule()->rescan_child_devices != NULL) { status = DriverModule()->rescan_child_devices(DriverData()); diff --git a/src/system/kernel/vm/vm_page.cpp b/src/system/kernel/vm/vm_page.cpp index 2b52b4ac6a..182f791c57 100644 --- a/src/system/kernel/vm/vm_page.cpp +++ b/src/system/kernel/vm/vm_page.cpp @@ -2537,7 +2537,7 @@ free_cached_page(vm_page *page, bool dontWait) VMCache* cache = page->Cache(); AutoLocker cacheLocker(cache, true); - MethodDeleter _2(cache, &VMCache::ReleaseRefLocked); + MethodDeleter _2(cache); // check again if that page is still a candidate if (page->busy || page->State() != PAGE_STATE_CACHED) diff --git a/src/system/libroot/os/find_paths.cpp b/src/system/libroot/os/find_paths.cpp index 2660cd12c9..6d613e4bef 100644 --- a/src/system/libroot/os/find_paths.cpp +++ b/src/system/libroot/os/find_paths.cpp @@ -557,8 +557,8 @@ internal_path_for_path(char* referencePath, size_t referencePathSize, // get the installation location InstallationLocations* installationLocations = InstallationLocations::Get(); - MethodDeleter installationLocationsDeleter( - installationLocations, &InstallationLocations::Put); + MethodDeleter + installationLocationsDeleter(installationLocations); size_t installationLocationIndex; const char* installationLocation = installationLocations->LocationFor( @@ -678,8 +678,8 @@ __find_paths_etc(const char* architecture, path_base_directory baseDirectory, // get the installation locations InstallationLocations* installationLocations = InstallationLocations::Get(); - MethodDeleter installationLocationsDeleter( - installationLocations, &InstallationLocations::Put); + MethodDeleter + installationLocationsDeleter(installationLocations); // Get the relative paths and compute the total size to allocate. const char* relativePaths[InstallationLocations::kCount]; @@ -756,8 +756,8 @@ __guess_secondary_architecture_from_path(const char* path, // get an installation location relative path InstallationLocations* installationLocations = InstallationLocations::Get(); - MethodDeleter installationLocationsDeleter( - installationLocations, &InstallationLocations::Put); + MethodDeleter + installationLocationsDeleter(installationLocations); size_t installationLocationIndex; const char* installationLocation = installationLocations->LocationFor(