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)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 31 Jan 2023 18:47:46 +0000 (10:47 -0800)
commite6261beb0c629403dc58997294dd521bd23664af
tree072b1166d5d643e251800eb108d8e734d60a4c9b
parent9a5571cff4ffcfc24847df9fd545cc5799ac0ee5
f2fs: allow set compression option of files without blocks

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>
fs/f2fs/file.c