f2fs: fix to check return value of f2fs_do_truncate_blocks()
authorChao Yu <chao@kernel.org>
Wed, 5 Apr 2023 14:44:53 +0000 (22:44 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 13 Apr 2023 23:37:57 +0000 (16:37 -0700)
commitb851ee6ba3cc212641e622ebcf92b950c7bafa07
tree2036b11e24ed690e3662d787a3f4519631b961d6
parent1ac3d037bee9ac3c4ec4041aafb54c5dffd7e1d0
f2fs: fix to check return value of f2fs_do_truncate_blocks()

Otherwise, if truncation on cow_inode failed, remained data may
pollute current transaction of atomic write.

Cc: Daeho Jeong <daehojeong@google.com>
Fixes: a46bebd502fe ("f2fs: synchronize atomic write aborts")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c