]> www.infradead.org Git - linux.git/commit
iomap: don't increase i_size in iomap_write_end()
authorZhang Yi <yi.zhang@huawei.com>
Tue, 18 Jun 2024 14:21:12 +0000 (22:21 +0800)
committerChristian Brauner <brauner@kernel.org>
Wed, 19 Jun 2024 13:58:28 +0000 (15:58 +0200)
commit602f09f4029c7b5e1a2f44a7651ac8922a904a1b
treec9d38d11b2aa0aa0f1df57040e1aab8865724b2e
parentd048945150b798147b324f05f7e8c857772b0d3f
iomap: don't increase i_size in iomap_write_end()

This reverts commit '0841ea4a3b41 ("iomap: keep on increasing i_size in
iomap_write_end()")'.

After xfs could zero out the tail blocks aligned to the allocation
unitsize and convert the tail blocks to unwritten for realtime inode on
truncate down, it couldn't expose any stale data when unaligned truncate
down realtime inodes, so we could keep on keeping i_size for
IOMAP_UNSHARE and IOMAP_ZERO in iomap_write_end().

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://lore.kernel.org/r/20240618142112.1315279-3-yi.zhang@huaweicloud.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/iomap/buffered-io.c