nilfs2: delete mark_inode_dirty in nilfs_delete_entry
Delete mark_inode_dirty() in nilfs_delete_entry() to reduce duplicate mark_inode_dirty() calls both in nilfs_rename() and nilfs_delete_entry(). Signed-off-by: Jiro SEKIBA <jir@unicus.jp> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
parent
58d55471cb
commit
3534573b58
|
@ -595,7 +595,6 @@ int nilfs_delete_entry(struct nilfs_dir_entry *dir, struct page *page)
|
||||||
nilfs_commit_chunk(page, mapping, from, to);
|
nilfs_commit_chunk(page, mapping, from, to);
|
||||||
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
|
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
|
||||||
/* NILFS_I(inode)->i_flags &= ~NILFS_BTREE_FL; */
|
/* NILFS_I(inode)->i_flags &= ~NILFS_BTREE_FL; */
|
||||||
mark_inode_dirty(inode);
|
|
||||||
out:
|
out:
|
||||||
nilfs_put_page(page);
|
nilfs_put_page(page);
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -334,6 +334,7 @@ static int nilfs_unlink(struct inode *dir, struct dentry *dentry)
|
||||||
err = nilfs_do_unlink(dir, dentry);
|
err = nilfs_do_unlink(dir, dentry);
|
||||||
|
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
mark_inode_dirty(dir);
|
||||||
mark_inode_dirty(dentry->d_inode);
|
mark_inode_dirty(dentry->d_inode);
|
||||||
err = nilfs_transaction_commit(dir->i_sb);
|
err = nilfs_transaction_commit(dir->i_sb);
|
||||||
} else
|
} else
|
||||||
|
@ -450,8 +451,8 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||||
if (dir_de) {
|
if (dir_de) {
|
||||||
nilfs_set_link(old_inode, dir_de, dir_page, new_dir);
|
nilfs_set_link(old_inode, dir_de, dir_page, new_dir);
|
||||||
drop_nlink(old_dir);
|
drop_nlink(old_dir);
|
||||||
mark_inode_dirty(old_dir);
|
|
||||||
}
|
}
|
||||||
|
mark_inode_dirty(old_dir);
|
||||||
mark_inode_dirty(old_inode);
|
mark_inode_dirty(old_inode);
|
||||||
|
|
||||||
err = nilfs_transaction_commit(old_dir->i_sb);
|
err = nilfs_transaction_commit(old_dir->i_sb);
|
||||||
|
|
Loading…
Reference in New Issue