aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ncpfs/dir.c')
-rw-r--r--fs/ncpfs/dir.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index e3e646b06404..9c51f621e901 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -1033,8 +1033,11 @@ static int ncp_rmdir(struct inode *dir, struct dentry *dentry)
1033 DPRINTK("ncp_rmdir: removing %s/%s\n", 1033 DPRINTK("ncp_rmdir: removing %s/%s\n",
1034 dentry->d_parent->d_name.name, dentry->d_name.name); 1034 dentry->d_parent->d_name.name, dentry->d_name.name);
1035 1035
1036 /*
1037 * fail with EBUSY if there are still references to this
1038 * directory.
1039 */
1036 dentry_unhash(dentry); 1040 dentry_unhash(dentry);
1037
1038 error = -EBUSY; 1041 error = -EBUSY;
1039 if (!d_unhashed(dentry)) 1042 if (!d_unhashed(dentry))
1040 goto out; 1043 goto out;
@@ -1141,8 +1144,16 @@ static int ncp_rename(struct inode *old_dir, struct dentry *old_dentry,
1141 old_dentry->d_parent->d_name.name, old_dentry->d_name.name, 1144 old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
1142 new_dentry->d_parent->d_name.name, new_dentry->d_name.name); 1145 new_dentry->d_parent->d_name.name, new_dentry->d_name.name);
1143 1146
1144 if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) 1147 if (new_dentry->d_inode && S_ISDIR(new_dentry->d_inode->i_mode)) {
1148 /*
1149 * fail with EBUSY if there are still references to this
1150 * directory.
1151 */
1145 dentry_unhash(new_dentry); 1152 dentry_unhash(new_dentry);
1153 error = -EBUSY;
1154 if (!d_unhashed(new_dentry))
1155 goto out;
1156 }
1146 1157
1147 ncp_age_dentry(server, old_dentry); 1158 ncp_age_dentry(server, old_dentry);
1148 ncp_age_dentry(server, new_dentry); 1159 ncp_age_dentry(server, new_dentry);