summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-07-30 07:25:18 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-08-29 00:02:43 +0300
commit9dfb3b8d655022760ca68af11821f1c63aa547c3 (patch)
tree70a926c1eb27480f540a86768dda9eaa46bedce8 /fs
parentab74ef708dc51df7cf2b8a890b9c6990fac5c0c6 (diff)
downloadlinux-9dfb3b8d655022760ca68af11821f1c63aa547c3.tar.xz
shmem: update folio if shmem_replace_page() updates the page
If we allocate a new page, we need to make sure that our folio matches that new page. If we do end up in this code path, we store the wrong page in the shmem inode's page cache, and I would rather imagine that data corruption ensues. This will be solved by changing shmem_replace_page() to shmem_replace_folio(), but this is the minimal fix. Link: https://lkml.kernel.org/r/20220730042518.1264767-1-willy@infradead.org Fixes: da08e9b79323 ("mm/shmem: convert shmem_swapin_page() to shmem_swapin_folio()") Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: William Kucharski <william.kucharski@oracle.com> Cc: Hugh Dickins <hughd@google.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions