f2fs: do not set compression bit if kernel doesn't support
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 4 Aug 2022 03:33:54 +0000 (20:33 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 5 Aug 2022 11:18:08 +0000 (04:18 -0700)
commit912f0d6580e743eecf908f5566cc064b63c55908
tree5d76b80ff6c33f521536a3184fea31a4f8d9682b
parentdbf8e63f48af48f3f0a069fc971c9826312dbfc1
f2fs: do not set compression bit if kernel doesn't support

If kernel doesn't have CONFIG_F2FS_FS_COMPRESSION, a file having FS_COMPR_FL via
ioctl(FS_IOC_SETFLAGS) is unaccessible due to f2fs_is_compress_backend_ready().
Let's avoid it.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c