linux-stable/fs/iomap
Matthew Wilcox (Oracle) f691ab24cf iomap: Set all uptodate bits for an Uptodate page
[ Upstream commit 4595a298d5 ]

For filesystems with block size < page size, we need to set all the
per-block uptodate bits if the page was already uptodate at the time
we create the per-block metadata.  This can happen if the page is
invalidated (eg by a write to drop_caches) but ultimately not removed
from the page cache.

This is a data corruption issue as page writeback skips blocks which
are marked !uptodate.

Fixes: 9dc55f1389 ("iomap: add support for sub-pagesize buffered I/O without buffer heads")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: Qian Cai <cai@redhat.com>
Cc: Brian Foster <bfoster@redhat.com>
Reviewed-by: Gao Xiang <hsiangkao@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:13:35 +01:00
..
Makefile
apply.c
buffered-io.c iomap: Set all uptodate bits for an Uptodate page 2024-03-01 13:13:35 +01:00
direct-io.c iomap: fix WARN_ON_ONCE() from unprivileged users 2020-10-29 09:58:06 +01:00
fiemap.c
seek.c iomap: remove the length variable in iomap_seek_hole 2021-07-31 08:19:39 +02:00
swapfile.c mm/swap: consider max pages in iomap_swapfile_add_extent 2021-09-15 09:47:35 +02:00