projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a5571c
)
f2fs: allow set compression option of files without blocks
author
Yangtao Li
<frank.li@vivo.com>
Mon, 23 Jan 2023 09:46:01 +0000
(17:46 +0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 31 Jan 2023 18:47:46 +0000
(10:47 -0800)
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
patch
|
blob
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index f5c1b78149540c5cfa295238e0d32a6e847027d0..391da47761e3259983137cb93cff502d69c675aa 100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-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;
}