[PATCH] fs/proc/task_mmu: hide unused pagemap_scan_backout_range() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>

This function has two callers, each of which are hidden behind an #ifdef:

fs/proc/task_mmu.c:2022:13: error: 'pagemap_scan_backout_range' defined but not used [-Werror=unused-function]

Add another conditional to check for both options to avoid the
unused-function warning.

Fixes: 93538f467c0f6 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
A different fix "fs-proc-task_mmu-implement-ioctl-to-get-and-optionally-clear-info-about-ptes-fix-2"
was applied already but is wrong and introduces a worse result:
fs/proc/task_mmu.c:2105:17: error: implicit declaration of function 'pagemap_scan_backout_range'; did you mean 'pagemap_scan_push_range'? [-Werror=implicit-function-declaration]

Please use this one instead if no other fix has been merged in the meantime.
---
 fs/proc/task_mmu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 27da6337d6754..f5d3f2b8fa944 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -2019,6 +2019,7 @@ static bool pagemap_scan_push_range(unsigned long categories,
 	return true;
 }
 
+#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLB_PAGE)
 static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
 				       unsigned long addr, unsigned long end)
 {
@@ -2031,6 +2032,7 @@ static void pagemap_scan_backout_range(struct pagemap_scan_private *p,
 
 	p->found_pages -= (end - addr) / PAGE_SIZE;
 }
+#endif
 
 static int pagemap_scan_output(unsigned long categories,
 			       struct pagemap_scan_private *p,
-- 
2.39.2




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux