[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230927060257.2975412-1-arnd@kernel.org>
Date: Wed, 27 Sep 2023 08:02:23 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Michał Mirosław <mirq-linux@...e.qmqm.pl>,
Muhammad Usama Anjum <usama.anjum@...labora.com>,
Andrei Vagin <avagin@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Arnd Bergmann <arnd@...db.de>,
David Hildenbrand <david@...hat.com>,
"Mike Rapoport (IBM)" <rppt@...nel.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Hugh Dickins <hughd@...gle.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org
Subject: [PATCH] fs/proc/task_mmu: hide unused pagemap_scan_backout_range() function
From: Arnd Bergmann <arnd@...db.de>
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@...db.de>
---
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
Powered by blists - more mailing lists