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:55:18 +0000 (13:55 +0100)
commite11707d5f86fe1b507b1c2d70258df7c2661454e
treedcb65f5f1e150aad42944c3b1c3d0809ead20022
parent05006a1521d8b5d4f87919942bf1180070cbc4ff
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