Skip to content

Commit 66d34fc

Browse files
Sungjong SeoJaegeuk Kim
authored andcommitted
f2fs: allow compression for mmap files in compress_mode=user
Since commit e3c5483 ("f2fs: let's allow compression for mmap files"), it has been allowed to compress mmap files. However, in compress_mode=user, it is not allowed yet. To keep the same concept in both compress_modes, f2fs_ioc_(de)compress_file() should also allow it. Let's remove checking mmap files in f2fs_ioc_(de)compress_file() so that the compression for mmap files is also allowed in compress_mode=user. Signed-off-by: Sungjong Seo <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 759820c commit 66d34fc

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

fs/f2fs/file.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3945,11 +3945,6 @@ static int f2fs_ioc_decompress_file(struct file *filp, unsigned long arg)
39453945
goto out;
39463946
}
39473947

3948-
if (f2fs_is_mmap_file(inode)) {
3949-
ret = -EBUSY;
3950-
goto out;
3951-
}
3952-
39533948
ret = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
39543949
if (ret)
39553950
goto out;
@@ -4017,11 +4012,6 @@ static int f2fs_ioc_compress_file(struct file *filp, unsigned long arg)
40174012
goto out;
40184013
}
40194014

4020-
if (f2fs_is_mmap_file(inode)) {
4021-
ret = -EBUSY;
4022-
goto out;
4023-
}
4024-
40254015
ret = filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
40264016
if (ret)
40274017
goto out;

0 commit comments

Comments
 (0)