From: Hugh Dickins Date: Mon, 20 Mar 2023 05:23:36 +0000 (-0700) Subject: shmem-open-code-the-page-cache-lookup-in-shmem_get_folio_gfp-fix X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8c90f73d5673c9f965bdb674127ed76f83ca979c;p=users%2Fjedix%2Flinux-maple.git shmem-open-code-the-page-cache-lookup-in-shmem_get_folio_gfp-fix Adjust the new comment line: shmem folio may have been swapped out. Link: https://lkml.kernel.org/r/af178ebb-1076-a38c-1dc1-2a37ccce4a3@google.com Signed-off-by: Hugh Dickins Cc: Andreas Gruenbacher Cc: Christoph Hellwig Cc: Matthew Wilcox (Oracle) Cc: Ryusuke Konishi Signed-off-by: Andrew Morton --- diff --git a/mm/shmem.c b/mm/shmem.c index e801e978af69d..e0242f9fd5969 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1904,7 +1904,7 @@ repeat: if (folio) { folio_lock(folio); - /* Has the page been truncated? */ + /* Has the folio been truncated or swapped out? */ if (unlikely(folio->mapping != mapping)) { folio_unlock(folio); folio_put(folio);