]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: fix to relocate check condition in f2fs_fallocate()
authorChao Yu <chao@kernel.org>
Wed, 3 Apr 2024 14:24:19 +0000 (22:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:36 +0000 (13:39 +0200)
commit2623fae7e76900b8533c1b6c956d1873e6312300
tree2c60d02059781448fc1d10d2fadd96ddf48e26eb
parent71486c10c5502a5adb8627e4d057e27c8627c7c7
f2fs: fix to relocate check condition in f2fs_fallocate()

[ Upstream commit 278a6253a673611dbc8ab72a3b34b151a8e75822 ]

compress and pinfile flag should be checked after inode lock held to
avoid race condition, fix it.

Fixes: 4c8ff7095bef ("f2fs: support data compression")
Fixes: 5fed0be8583f ("f2fs: do not allow partial truncation on pinned file")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/file.c