Skip to content

Commit

Permalink
ncpfs: don't bother with EBUSY on removal of busy directories
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jun 29, 2013
1 parent 5faf153 commit 338b2f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 0 additions & 11 deletions fs/ncpfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,17 +1123,6 @@ 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)) {
/*
* 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
4 changes: 4 additions & 0 deletions fs/ncpfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,10 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
if (!server) /* How this could happen? */
goto out;

result = -EPERM;
if (IS_DEADDIR(dentry->d_inode))
goto out;

/* ageing the dentry to force validation */
ncp_age_dentry(server, dentry);

Expand Down

0 comments on commit 338b2f5

Please sign in to comment.