From: Christoph Hellwig Date: Fri, 12 Jul 2019 03:57:36 +0000 (-0700) Subject: mm: mark the page referenced in gup_hugepte X-Git-Tag: v5.3-rc1~120^2~49 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=520b4a4496f12b117b94f3ac7c493651881c5fe3;p=users%2Fjedix%2Flinux-maple.git mm: mark the page referenced in gup_hugepte All other get_user_page_fast cases mark the page referenced, so do this here as well. Link: http://lkml.kernel.org/r/20190625143715.1689-17-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Andrey Konovalov Cc: Benjamin Herrenschmidt Cc: David Miller Cc: James Hogan Cc: Jason Gunthorpe Cc: Khalid Aziz Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Paul Burton Cc: Paul Mackerras Cc: Ralf Baechle Cc: Rich Felker Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/gup.c b/mm/gup.c index 7763abd16405..83d480e9b05f 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -2020,6 +2020,7 @@ static int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr, return 0; } + SetPageReferenced(head); return 1; }