mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
f2fs: allow set compression option of files without blocks
[ Upstream commite6261beb0c
] Files created by truncate have a size but no blocks, so they can be allowed to set compression option. Fixes:e1e8debec6
("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>
This commit is contained in:
parent
aa5c41886b
commit
134f4aaee6
1 changed files with 1 additions and 1 deletions
|
@ -3928,7 +3928,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue