Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252721
b: refs/heads/master
c: 76cc071
h: refs/heads/master
i:
  252719: 1f1ec06
v: v3
  • Loading branch information
Sage Weil authored and Al Viro committed May 28, 2011
1 parent 230a75d commit e159be0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 7ce605d93b775e8a960b0be244f7be565e73b3c1
refs/heads/master: 76cc071a06afb4d2dd17bb1b855a233a419e7e02
10 changes: 9 additions & 1 deletion trunk/fs/ncpfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1144,8 +1144,16 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
new_dentry->d_parent->d_name.name, new_dentry->d_name.name);

if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode))
if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) {
/*
* fail with EBUSY if there are still references to this
* directory.
*/
dentry_unhash(new_dentry);
error = -EBUSY;
if (!d_unhashed(new_dentry))
goto out;
}

ncp_age_dentry(server, old_dentry);
ncp_age_dentry(server, new_dentry);
Expand Down

0 comments on commit e159be0

Please sign in to comment.