diff mbox series

[08/13] mm: fix the try_to_unmap prototype for !CONFIG_MMU

Message ID 20210715042655.ljTZkSkdp%akpm@linux-foundation.org (mailing list archive)
State New
Headers show
Series [01/13] mm: move helper to check slub_debug_enabled | expand

Commit Message

Andrew Morton July 15, 2021, 4:26 a.m. UTC
From: Christoph Hellwig <hch@lst.de>
Subject: mm: fix the try_to_unmap prototype for !CONFIG_MMU

Adjust the nommu stub of try_to_unmap to match the changed protype for the
full version.  Turn it into an inline instead of a macro to generally
improve the type checking.

Link: https://lkml.kernel.org/r/20210705053944.885828-1-hch@lst.de
Fixes: 1fb08ac63bee ("mm: rmap: make try_to_unmap() void function")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/rmap.h |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

--- a/include/linux/rmap.h~mm-fix-the-try_to_unmap-prototype-for-config_mmu
+++ a/include/linux/rmap.h
@@ -291,7 +291,9 @@  static inline int page_referenced(struct
 	return 0;
 }
 
-#define try_to_unmap(page, refs) false
+static inline void try_to_unmap(struct page *page, enum ttu_flags flags)
+{
+}
 
 static inline int page_mkclean(struct page *page)
 {