patch-2.1.131 linux/fs/umsdos/namei.c

Next file: linux/fs/umsdos/rdir.c
Previous file: linux/fs/umsdos/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.130/linux/fs/umsdos/namei.c linux/fs/umsdos/namei.c
@@ -1008,8 +1008,7 @@
 		goto out;
 
 	ret = -EBUSY;
-	shrink_dcache_parent(dentry);
-	if (dentry->d_count > 1)
+	if (!list_empty(&dentry->d_hash))
 		goto out;
 
 	/* check the sticky bit */
@@ -1020,11 +1019,6 @@
 		goto out;
 	}
 
-	/*
-	 * Lock the directory, then check whether it's empty.
-	 */
-	down(&dentry->d_inode->i_sem);
-
 	/* check whether the EMD is empty */
 	ret = -ENOTEMPTY;
 	empty = umsdos_isempty (dentry);
@@ -1050,7 +1044,6 @@
 		}
 	} else if (empty == 2)
 		ret = 0;
-	up(&dentry->d_inode->i_sem);
 	if (ret)
 		goto out;
 
@@ -1071,15 +1064,6 @@
 	else
 		d_drop(temp);
 
-	/* Check again for a busy dentry */
-	ret = -EBUSY;
-	shrink_dcache_parent(dentry);
-	if (dentry->d_count > 1) {
-printk("umsdos_rmdir: %s/%s busy\n",
-dentry->d_parent->d_name.name, dentry->d_name.name);
-		goto out_dput;
-	}
-
 	/*
 	 * Attempt to remove the msdos name.
 	 */
@@ -1096,11 +1080,8 @@
 
 	/* dput() temp if we didn't do it above */
 out_dput:
-	if (temp != dentry) {
+	if (temp != dentry)
 		dput(temp);
-		if (!ret)
-			d_delete (dentry);
-	}
 
 out:
 	Printk (("umsdos_rmdir %d\n", ret));

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov