diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-05-20 16:32:49 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-06-02 18:05:12 -0700 |
commit | ee6d182f2a19d5d44607b5ae4bec523726d76a99 (patch) | |
tree | 514092851eb0e974c6ac8add90fed10056b84998 /fs/f2fs/file.c | |
parent | 0f18b462b2e5aff64b8638e8a47284b907351ef3 (diff) | |
download | linux-ee6d182f2a19d5d44607b5ae4bec523726d76a99.tar.gz linux-ee6d182f2a19d5d44607b5ae4bec523726d76a99.tar.bz2 linux-ee6d182f2a19d5d44607b5ae4bec523726d76a99.zip |
f2fs: remove syncing inode page in all the cases
This patch reduces to call them across the whole tree.
- sync_inode_page()
- update_inode_page()
- update_inode()
- f2fs_write_inode()
Instead, checkpoint will flush all the dirty inode metadata before syncing
node pages.
Note that, this is doable, since we call mark_inode_dirty_sync() for all
inode's field change which needs to update on-disk inode as well.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index c5606b1e1a89..73bc946974ad 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -173,12 +173,8 @@ static void try_to_fix_pino(struct inode *inode) get_parent_ino(inode, &pino)) { f2fs_i_pino_write(inode, pino); file_got_pino(inode); - up_write(&fi->i_sem); - - f2fs_write_inode(inode, NULL); - } else { - up_write(&fi->i_sem); } + up_write(&fi->i_sem); } static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end, @@ -499,7 +495,6 @@ int truncate_data_blocks_range(struct dnode_of_data *dn, int count) dn->inode) + ofs; f2fs_update_extent_cache_range(dn, fofs, 0, len); dec_valid_block_count(sbi, dn->inode, nr_free); - sync_inode_page(dn); } dn->ofs_in_node = ofs; @@ -1123,10 +1118,8 @@ static int f2fs_zero_range(struct inode *inode, loff_t offset, loff_t len, } out: - if (!(mode & FALLOC_FL_KEEP_SIZE) && i_size_read(inode) < new_size) { + if (!(mode & FALLOC_FL_KEEP_SIZE) && i_size_read(inode) < new_size) f2fs_i_size_write(inode, new_size); - update_inode_page(inode); - } return ret; } @@ -1232,10 +1225,8 @@ static int expand_inode_data(struct inode *inode, loff_t offset, new_size = ((loff_t)pg_end << PAGE_SHIFT) + off_end; } - if (!(mode & FALLOC_FL_KEEP_SIZE) && i_size_read(inode) < new_size) { + if (!(mode & FALLOC_FL_KEEP_SIZE) && i_size_read(inode) < new_size) f2fs_i_size_write(inode, new_size); - update_inode_page(inode); - } return ret; } |