f2fs: allow set compression option of files without blocks
authorYangtao Li <frank.li@vivo.com>
Mon, 23 Jan 2023 09:46:01 +0000 (17:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 12:57:23 +0000 (13:57 +0100)
commit354dfc05bd5f868a1cd1ca8247d3ddd31c0077e0
tree2666a05e0d41842930271446845ee26fb1765714
parentadd8515d59a150c2dffdb6e083ea88cb453b9ceb
f2fs: allow set compression option of files without blocks

[ Upstream commit e6261beb0c629403dc58997294dd521bd23664af ]

Files created by truncate have a size but no blocks, so
they can be allowed to set compression option.

Fixes: e1e8debec656 ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-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