aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2022-07-12 11:17:15 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2022-07-30 20:17:06 -0700
commit7165841d578e0592848e09dc9d131aa30be44e1b (patch)
tree96ac18c7596c7dfca5eb24e151d4c8fd56203d54 /fs/f2fs/f2fs.h
parentf2fs: Delete f2fs_copy_page() and replace with memcpy_page() (diff)
downloadlinux-dev-7165841d578e0592848e09dc9d131aa30be44e1b.tar.xz
linux-dev-7165841d578e0592848e09dc9d131aa30be44e1b.zip
f2fs: fix to check inline_data during compressed inode conversion
When converting inode to compressed one via ioctl, it needs to check inline_data, since inline_data flag and compressed flag are incompatible. Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu <chao.yu@oppo.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 6d9f7d577c8a..116d491b346d 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -4404,7 +4404,7 @@ static inline bool f2fs_low_mem_mode(struct f2fs_sb_info *sbi)
static inline bool f2fs_may_compress(struct inode *inode)
{
if (IS_SWAPFILE(inode) || f2fs_is_pinned_file(inode) ||
- f2fs_is_atomic_file(inode))
+ f2fs_is_atomic_file(inode) || f2fs_has_inline_data(inode))
return false;
return S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode);
}