summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_fprobe.c
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2024-06-03 19:22:22 +0800
committerChristian Brauner <brauner@kernel.org>2024-06-05 17:23:39 +0200
commit0841ea4a3b416554be401a91aa267b7de838de8b (patch)
treebbefefac8b2269bd651081457fd97486a5b59417 /kernel/trace/trace_fprobe.c
parent3d117494e2a88b9c1e8ad41bbbf2cf453a73620e (diff)
downloadlinux-stable-0841ea4a3b416554be401a91aa267b7de838de8b.tar.gz
linux-stable-0841ea4a3b416554be401a91aa267b7de838de8b.tar.bz2
linux-stable-0841ea4a3b416554be401a91aa267b7de838de8b.zip
iomap: keep on increasing i_size in iomap_write_end()
Commit '943bc0882ceb ("iomap: don't increase i_size if it's not a write operation")' breaks xfs with realtime device on generic/561, the problem is when unaligned truncate down a xfs realtime inode with rtextsize > 1 fs block, xfs only zero out the EOF block but doesn't zero out the tail blocks that aligned to rtextsize, so if we don't increase i_size in iomap_write_end(), it could expose stale data after we do an append write beyond the aligned EOF block. xfs should zero out the tail blocks when truncate down, but before we finish that, let's fix the issue by just revert the changes in iomap_write_end(). Fixes: 943bc0882ceb ("iomap: don't increase i_size if it's not a write operation") Reported-by: Chandan Babu R <chandanbabu@kernel.org> Link: https://lore.kernel.org/linux-xfs/0b92a215-9d9b-3788-4504-a520778953c2@huaweicloud.com Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Link: https://lore.kernel.org/r/20240603112222.2109341-1-yi.zhang@huaweicloud.com Tested-by: Chandan Babu R <chandanbabu@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'kernel/trace/trace_fprobe.c')
0 files changed, 0 insertions, 0 deletions