diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-03-18 14:40:45 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-03-31 06:46:23 +0300 |
commit | 530e07042002f8c2893bab83d63e10f2750a4d50 (patch) | |
tree | ebbde43fd6095e03e31046df3512d2e40a72f281 /fs/f2fs | |
parent | 1a67cbe141cf991af252a88143d0fd975be2d9e7 (diff) | |
download | linux-530e07042002f8c2893bab83d63e10f2750a4d50.tar.xz |
f2fs: don't mark compressed inode dirty during f2fs_iget()
- f2fs_iget
- do_read_inode
- set_inode_flag(, FI_COMPRESSED_FILE)
- __mark_inode_dirty_flag(, true)
It's unnecessary, so let's just mark compressed inode dirty while
compressed inode conversion.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 3e727a6af08e..e720054c9062 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -2573,7 +2573,6 @@ static inline void __mark_inode_dirty_flag(struct inode *inode, case FI_DATA_EXIST: case FI_INLINE_DOTS: case FI_PIN_FILE: - case FI_COMPRESSED_FILE: f2fs_mark_inode_dirty_sync(inode, true); } } @@ -3837,6 +3836,7 @@ static inline void set_compress_context(struct inode *inode) F2FS_I(inode)->i_flags |= F2FS_COMPR_FL; set_inode_flag(inode, FI_COMPRESSED_FILE); stat_inc_compr_inode(inode); + f2fs_mark_inode_dirty_sync(inode, true); } static inline u64 f2fs_disable_compressed_file(struct inode *inode) @@ -3853,6 +3853,7 @@ static inline u64 f2fs_disable_compressed_file(struct inode *inode) fi->i_flags &= ~F2FS_COMPR_FL; stat_dec_compr_inode(inode); clear_inode_flag(inode, FI_COMPRESSED_FILE); + f2fs_mark_inode_dirty_sync(inode, true); return 0; } |