diff options
author | Jiro SEKIBA <jir@unicus.jp> | 2009-11-27 11:41:07 +0100 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-27 12:05:15 +0100 |
commit | 43f8bc262fcfadc7583b2353d2708e6eb77788ff (patch) | |
tree | 1c899548d8c16d5f77e3d39eff5263fddaa6400a /fs/nilfs2/namei.c | |
parent | nilfs2: delete mark_inode_dirty in nilfs_new_inode (diff) | |
download | linux-43f8bc262fcfadc7583b2353d2708e6eb77788ff.tar.xz linux-43f8bc262fcfadc7583b2353d2708e6eb77788ff.zip |
nilfs2: delete mark_inode_dirty from nilfs_set_link
Delete mark_inode_dirty() from nilfs_set_link() to reduce redundant
mark_inode_dirty() calls in caller of nilfs_set_link().
Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/namei.c')
-rw-r--r-- | fs/nilfs2/namei.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 01adda823297..4616f96be700 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c @@ -397,6 +397,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, goto out_dir; inode_inc_link_count(old_inode); nilfs_set_link(new_dir, new_de, new_page, old_inode); + mark_inode_dirty(new_dir); new_inode->i_ctime = CURRENT_TIME; if (dir_de) drop_nlink(new_inode); @@ -425,12 +426,13 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry, old_inode->i_ctime = CURRENT_TIME; nilfs_delete_entry(old_de, old_page); - inode_dec_link_count(old_inode); + drop_nlink(old_inode); if (dir_de) { nilfs_set_link(old_inode, dir_de, dir_page, new_dir); inode_dec_link_count(old_dir); } + mark_inode_dirty(old_inode); err = nilfs_transaction_commit(old_dir->i_sb); return err; |