linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: fix the try_to_unmap prototype for !CONFIG_MMU
@ 2021-07-05  5:39 Christoph Hellwig
  2021-07-06 20:41 ` Yang Shi
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2021-07-05  5:39 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm

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.

Fixes: 1fb08ac63bee ("mm: rmap: make try_to_unmap() void function")
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/rmap.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 83fb86133fe1..c976cc6de257 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -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)
 {
-- 
2.30.2



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm: fix the try_to_unmap prototype for !CONFIG_MMU
  2021-07-05  5:39 [PATCH] mm: fix the try_to_unmap prototype for !CONFIG_MMU Christoph Hellwig
@ 2021-07-06 20:41 ` Yang Shi
  0 siblings, 0 replies; 2+ messages in thread
From: Yang Shi @ 2021-07-06 20:41 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Andrew Morton, Linux MM

On Sun, Jul 4, 2021 at 10:40 PM Christoph Hellwig <hch@lst.de> wrote:
>
> 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.

Thanks for catching this. Reviewed-by: Yang Shi <shy828301@gmail.com>

>
> Fixes: 1fb08ac63bee ("mm: rmap: make try_to_unmap() void function")
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  include/linux/rmap.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/linux/rmap.h b/include/linux/rmap.h
> index 83fb86133fe1..c976cc6de257 100644
> --- a/include/linux/rmap.h
> +++ b/include/linux/rmap.h
> @@ -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)
>  {
> --
> 2.30.2
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-06 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05  5:39 [PATCH] mm: fix the try_to_unmap prototype for !CONFIG_MMU Christoph Hellwig
2021-07-06 20:41 ` Yang Shi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox