diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-03-10 20:50:08 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-11 08:25:38 -0700 |
commit | 6cfdf15fdbff85acbaa92920bee88f37ca0404ba (patch) | |
tree | d10f81a4f44a5b1790da185ed8454251e4d9a87b /fs/f2fs | |
parent | 96f5b4fa567040360dc57fd39b8e1a85a3e0132a (diff) | |
download | linux-stable-6cfdf15fdbff85acbaa92920bee88f37ca0404ba.tar.gz linux-stable-6cfdf15fdbff85acbaa92920bee88f37ca0404ba.tar.bz2 linux-stable-6cfdf15fdbff85acbaa92920bee88f37ca0404ba.zip |
f2fs: fix to check dirty pages during compressed inode conversion
Compressed cluster can be generated during dirty data writeback,
if there is dirty pages on compressed inode, it needs to disable
converting compressed inode to non-compressed one.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 23013d3b59ba..dbca4c6a7aaf 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -3820,6 +3820,8 @@ static inline u64 f2fs_disable_compressed_file(struct inode *inode) if (!f2fs_compressed_file(inode)) return 0; + if (get_dirty_pages(inode)) + return 1; if (fi->i_compr_blocks) return fi->i_compr_blocks; |