]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
shmem-open-code-the-page-cache-lookup-in-shmem_get_folio_gfp-fix
authorHugh Dickins <hughd@google.com>
Mon, 20 Mar 2023 05:23:36 +0000 (22:23 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:24:58 +0000 (16:24 -0700)
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 <hughd@google.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c

index e801e978af69d229306161fdf04277368bddaafa..e0242f9fd5969ffda0e53498b3253511b236e18e 100644 (file)
@@ -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);