aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2
diff options
context:
space:
mode:
authorJiro SEKIBA <jir@unicus.jp>2009-11-27 05:41:07 -0500
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-11-27 06:05:15 -0500
commit43f8bc262fcfadc7583b2353d2708e6eb77788ff (patch)
tree1c899548d8c16d5f77e3d39eff5263fddaa6400a /fs/nilfs2
parent9ca941d4b62e72571948efe5a73c563b4cacc98d (diff)
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')
-rw-r--r--fs/nilfs2/dir.c1
-rw-r--r--fs/nilfs2/namei.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index e097099bfc8f..4f3fa0030e2c 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -459,7 +459,6 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
459 nilfs_put_page(page); 459 nilfs_put_page(page);
460 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 460 dir->i_mtime = dir->i_ctime = CURRENT_TIME;
461/* NILFS_I(dir)->i_flags &= ~NILFS_BTREE_FL; */ 461/* NILFS_I(dir)->i_flags &= ~NILFS_BTREE_FL; */
462 mark_inode_dirty(dir);
463} 462}
464 463
465/* 464/*
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,
397 goto out_dir; 397 goto out_dir;
398 inode_inc_link_count(old_inode); 398 inode_inc_link_count(old_inode);
399 nilfs_set_link(new_dir, new_de, new_page, old_inode); 399 nilfs_set_link(new_dir, new_de, new_page, old_inode);
400 mark_inode_dirty(new_dir);
400 new_inode->i_ctime = CURRENT_TIME; 401 new_inode->i_ctime = CURRENT_TIME;
401 if (dir_de) 402 if (dir_de)
402 drop_nlink(new_inode); 403 drop_nlink(new_inode);
@@ -425,12 +426,13 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
425 old_inode->i_ctime = CURRENT_TIME; 426 old_inode->i_ctime = CURRENT_TIME;
426 427
427 nilfs_delete_entry(old_de, old_page); 428 nilfs_delete_entry(old_de, old_page);
428 inode_dec_link_count(old_inode); 429 drop_nlink(old_inode);
429 430
430 if (dir_de) { 431 if (dir_de) {
431 nilfs_set_link(old_inode, dir_de, dir_page, new_dir); 432 nilfs_set_link(old_inode, dir_de, dir_page, new_dir);
432 inode_dec_link_count(old_dir); 433 inode_dec_link_count(old_dir);
433 } 434 }
435 mark_inode_dirty(old_inode);
434 436
435 err = nilfs_transaction_commit(old_dir->i_sb); 437 err = nilfs_transaction_commit(old_dir->i_sb);
436 return err; 438 return err;