f2fs: fix to check pinfile flag in f2fs_move_file_range()
authorChao Yu <chao@kernel.org>
Wed, 3 Apr 2024 14:24:20 +0000 (22:24 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 12 Apr 2024 20:58:35 +0000 (20:58 +0000)
commite07230da0500e0919a765037c5e81583b519be2c
treeb0ef265464e782bd47985a682cab0b9e9f828c36
parent278a6253a673611dbc8ab72a3b34b151a8e75822
f2fs: fix to check pinfile flag in f2fs_move_file_range()

ioctl(F2FS_IOC_MOVE_RANGE) can truncate or punch hole on pinned file,
fix to disallow it.

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