f2fs: make file immutable even if releasing zero compression block
authorDaeho Jeong <daehojeong@google.com>
Thu, 30 Jul 2020 05:09:28 +0000 (14:09 +0900)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Aug 2020 01:05:03 +0000 (18:05 -0700)
commit567c4bf54a85a14af4ca9be19d7dc327e56a15f9
treed82fa436888c7fc5a275491458ffea505a4e0aad
parent1f0b067b6e4927f06f5ffaea8eccdf722e563819
f2fs: make file immutable even if releasing zero compression block

When we use F2FS_IOC_RELEASE_COMPRESS_BLOCKS ioctl, if we can't find
any compressed blocks in the file even with large file size, the
ioctl just ends up without changing the file's status as immutable.
It makes the user, who expects that the file is immutable when it
returns successfully, confused.

Signed-off-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c