Skip to content

Commit

Permalink
mm: fix the try_to_unmap prototype for !CONFIG_MMU
Browse files Browse the repository at this point in the history
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: 1fb08ac ("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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Jul 15, 2021
1 parent 0614784 commit ab7965d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/rmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ static inline int page_referenced(struct page *page, int is_locked,
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)
{
Expand Down

0 comments on commit ab7965d

Please sign in to comment.