From 8c90f73d5673c9f965bdb674127ed76f83ca979c Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Sun, 19 Mar 2023 22:23:36 -0700 Subject: [PATCH] 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 --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index e801e978af69..e0242f9fd596 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); -- 2.50.1