diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-14 21:53:23 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 04:57:16 -0400 |
commit | 338b2f57499f37c18887182b48a499efb8a6b68f (patch) | |
tree | 08dfffef3694e07b02bf6ae03c5862e69b827dbb | |
parent | 5faf153ebf6128f02ad6ffa2e8bbc9d823ef762c (diff) |
ncpfs: don't bother with EBUSY on removal of busy directories
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/ncpfs/dir.c | 11 | ||||
-rw-r--r-- | fs/ncpfs/inode.c | 4 |
2 files changed, 4 insertions, 11 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c index 0e7f00298213..e5d488530580 100644 --- a/fs/ncpfs/dir.c +++ b/fs/ncpfs/dir.c | |||
@@ -1123,17 +1123,6 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1123 | old_dentry->d_parent->d_name.name, old_dentry->d_name.name, | 1123 | old_dentry->d_parent->d_name.name, old_dentry->d_name.name, |
1124 | new_dentry->d_parent->d_name.name, new_dentry->d_name.name); | 1124 | new_dentry->d_parent->d_name.name, new_dentry->d_name.name); |
1125 | 1125 | ||
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 | |||
1137 | ncp_age_dentry(server, old_dentry); | 1126 | ncp_age_dentry(server, old_dentry); |
1138 | ncp_age_dentry(server, new_dentry); | 1127 | ncp_age_dentry(server, new_dentry); |
1139 | 1128 | ||
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 26910c8154da..0765ad12c382 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
@@ -891,6 +891,10 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr) | |||
891 | if (!server) /* How this could happen? */ | 891 | if (!server) /* How this could happen? */ |
892 | goto out; | 892 | goto out; |
893 | 893 | ||
894 | result = -EPERM; | ||
895 | if (IS_DEADDIR(dentry->d_inode)) | ||
896 | goto out; | ||
897 | |||
894 | /* ageing the dentry to force validation */ | 898 | /* ageing the dentry to force validation */ |
895 | ncp_age_dentry(server, dentry); | 899 | ncp_age_dentry(server, dentry); |
896 | 900 | ||