Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233813
b: refs/heads/master
c: 30eb43d
h: refs/heads/master
i:
  233811: 3ba9e9e
v: v3
  • Loading branch information
Al Viro committed Mar 3, 2011
1 parent 123cd96 commit 9e9afc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f88049caf56022c773272e03ddfa8cf79867059
refs/heads/master: 30eb43d31478f0fca28423623f3ec6af13f845fa
8 changes: 1 addition & 7 deletions trunk/fs/nilfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
new_de = nilfs_find_entry(new_dir, &new_dentry->d_name, &new_page);
if (!new_de)
goto out_dir;
inc_nlink(old_inode);
nilfs_set_link(new_dir, new_de, new_page, old_inode);
nilfs_mark_inode_dirty(new_dir);
new_inode->i_ctime = CURRENT_TIME;
Expand All @@ -411,13 +410,9 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
if (new_dir->i_nlink >= NILFS_LINK_MAX)
goto out_dir;
}
inc_nlink(old_inode);
err = nilfs_add_link(new_dentry, old_inode);
if (err) {
drop_nlink(old_inode);
nilfs_mark_inode_dirty(old_inode);
if (err)
goto out_dir;
}
if (dir_de) {
inc_nlink(new_dir);
nilfs_mark_inode_dirty(new_dir);
Expand All @@ -431,7 +426,6 @@ 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);
drop_nlink(old_inode);

if (dir_de) {
nilfs_set_link(old_inode, dir_de, dir_page, new_dir);
Expand Down

0 comments on commit 9e9afc7

Please sign in to comment.