# \[PATCH v2 net-next 1/4\] mm: constify page\_is\_pfmemalloc() argument

- From: Alexander Lobakin \<hidden\>
- Date: 2021-01-27 20:12:05 
- List: linux-rdma
- Page: https://ratatoskr.run/linux-rdma/2021/01/6250015
- Thread: https://ratatoskr.run/netdev/2021/01/6250014/t.md

```text
The function only tests for page->index, so its argument should be
const.

Signed-off-by: Alexander Lobakin <redacted>
---
 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 ecdf8a8cd6ae..078633d43af9 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -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
-- 
2.30.0


```
