Skip to content

Commit 338b2f5

Browse files
author
Al Viro
committed
ncpfs: don't bother with EBUSY on removal of busy directories
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 5faf153 commit 338b2f5

2 files changed

Lines changed: 4 additions & 11 deletions

File tree

‎fs/ncpfs/dir.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,17 +1123,6 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
11231123
old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
11241124
new_dentry->d_parent->d_name.name, new_dentry->d_name.name);
11251125

1126-
if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) {
1127-
/*
1128-
* fail with EBUSY if there are still references to this
1129-
* directory.
1130-
*/
1131-
dentry_unhash(new_dentry);
1132-
error = -EBUSY;
1133-
if (!d_unhashed(new_dentry))
1134-
goto out;
1135-
}
1136-
11371126
ncp_age_dentry(server, old_dentry);
11381127
ncp_age_dentry(server, new_dentry);
11391128

‎fs/ncpfs/inode.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,10 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
891891
if (!server) /* How this could happen? */
892892
goto out;
893893

894+
result = -EPERM;
895+
if (IS_DEADDIR(dentry->d_inode))
896+
goto out;
897+
894898
/* ageing the dentry to force validation */
895899
ncp_age_dentry(server, dentry);
896900

0 commit comments

Comments
 (0)