Commit e6261beb authored by Yangtao Li's avatar Yangtao Li Committed by Jaegeuk Kim
Browse files

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: e1e8debe ("f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl")
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 9a5571cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3941,7 +3941,7 @@ static int f2fs_ioc_set_compress_option(struct file *filp, unsigned long arg)
		goto out;
	}

	if (inode->i_size != 0) {
	if (F2FS_HAS_BLOCKS(inode)) {
		ret = -EFBIG;
		goto out;
	}