mm: constify page_is_pfmemalloc() argument
authorAlexander Lobakin <alobakin@pm.me>
Tue, 2 Feb 2021 13:30:54 +0000 (13:30 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 5 Feb 2021 02:20:13 +0000 (18:20 -0800)
The function only tests for page->index, so its argument should be
const.

Signed-off-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/mm.h

index ecdf8a8cd6aebe62f49ae45bf7aab623b9e5282b..078633d43af9571caa5411495300fc9c536beed5 100644 (file)
@@ -1584,7 +1584,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