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/namei.c | |
parent | 0f18b462b2e5aff64b8638e8a47284b907351ef3 (diff) | |
download | linux-stable-ee6d182f2a19d5d44607b5ae4bec523726d76a99.tar.gz linux-stable-ee6d182f2a19d5d44607b5ae4bec523726d76a99.tar.bz2 linux-stable-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/namei.c')
-rw-r--r-- | fs/f2fs/namei.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index f2b2c4068648..496f4e3018b2 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -706,9 +706,6 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, add_orphan_inode(sbi, new_inode->i_ino); else release_orphan_inode(sbi); - - update_inode_page(old_inode); - update_inode_page(new_inode); } else { f2fs_balance_fs(sbi, true); @@ -720,10 +717,8 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, goto out_whiteout; } - if (old_dir_entry) { + if (old_dir_entry) f2fs_i_links_write(new_dir, true); - update_inode_page(new_dir); - } /* * old entry and new entry can locate in the same inline @@ -771,13 +766,11 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry, if (old_dir != new_dir && !whiteout) { f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir); - update_inode_page(old_inode); } else { f2fs_dentry_kunmap(old_inode, old_dir_page); f2fs_put_page(old_dir_page, 0); } f2fs_i_links_write(old_dir, false); - update_inode_page(old_dir); } f2fs_unlock_op(sbi); @@ -899,8 +892,6 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, file_lost_pino(old_inode); up_write(&F2FS_I(old_inode)->i_sem); - update_inode_page(old_inode); - old_dir->i_ctime = CURRENT_TIME; if (old_nlink) { down_write(&F2FS_I(old_dir)->i_sem); @@ -908,7 +899,6 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, up_write(&F2FS_I(old_dir)->i_sem); } mark_inode_dirty_sync(old_dir); - update_inode_page(old_dir); /* update directory entry info of new dir inode */ f2fs_set_link(new_dir, new_entry, new_page, old_inode); @@ -917,8 +907,6 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, file_lost_pino(new_inode); up_write(&F2FS_I(new_inode)->i_sem); - update_inode_page(new_inode); - new_dir->i_ctime = CURRENT_TIME; if (new_nlink) { down_write(&F2FS_I(new_dir)->i_sem); @@ -926,7 +914,6 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry, up_write(&F2FS_I(new_dir)->i_sem); } mark_inode_dirty_sync(new_dir); - update_inode_page(new_dir); f2fs_unlock_op(sbi); |