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)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 12 Apr 2024 20:58:35 +0000 (20:58 +0000)
commit278a6253a673611dbc8ab72a3b34b151a8e75822
tree440b11a1002cbe8e4be9c19897d570cabb6a9bbd
parentbd9ae4ae9e585061acfd4a169f2321706f900246
f2fs: fix to relocate check condition in f2fs_fallocate()

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>
fs/f2fs/file.c