]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:36 +0000 (13:39 +0200)
commit919f899a22075c9233157ccfcca1b5bbd9b02600
tree5e8aa8e31696f386177def78c88a6815ebeadd02
parent2623fae7e76900b8533c1b6c956d1873e6312300
f2fs: fix to check pinfile flag in f2fs_move_file_range()

[ Upstream commit e07230da0500e0919a765037c5e81583b519be2c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/file.c