From 2e5f71addee614968003d0d717b93d622a1489db Mon Sep 17 00:00:00 2001 From: Alexander Lobakin Date: Fri, 16 Jul 2021 17:19:14 +0800 Subject: [PATCH] mm: constify page_is_pfmemalloc() argument mainline inclusion from mainline-v5.12-rc1-dontuse commit 1d7bab6a94458e959f3f55788fd50ddc7d97403b category: feature bugzilla: 173966 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1d7bab6a94458e959f3f55788fd50ddc7d97403b ---------------------------------------------------------------------- The function only tests for page->index, so its argument should be const. Signed-off-by: Alexander Lobakin Reviewed-by: Jesse Brandeburg Acked-by: David Rientjes Signed-off-by: Jakub Kicinski Reviewed-by: Yongxin Li Signed-off-by: Zheng Zengkai --- include/linux/mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index babd72819930..dc5f3647e76d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1596,7 +1596,7 @@ struct address_space *page_mapping_file(struct page *page); * ALLOC_NO_WATERMARKS and the low watermark was not * met implying that the system is under some pressure. */ -static inline bool page_is_pfmemalloc(struct page *page) +static inline bool page_is_pfmemalloc(const struct page *page) { /* * Page index cannot be this large so this must be -- GitLab