patch-2.3.51 linux/fs/minix/namei.c

Next file: linux/fs/msdos/msdosfs_syms.c
Previous file: linux/fs/minix/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.50/linux/fs/minix/namei.c linux/fs/minix/namei.c
@@ -399,7 +399,7 @@
 		retval = -ENOENT;
 		goto end_rmdir;
 	}
-	if (!list_empty(&dentry->d_hash)) {
+	if (!d_unhashed(dentry)) {
 		retval = -EBUSY;
 		goto end_rmdir;
 	}
@@ -569,6 +569,9 @@
 	}
 	if (S_ISDIR(old_inode->i_mode)) {
 		if (new_inode) {
+			retval = -EBUSY;
+			if (!d_unhashed(new_dentry))
+				goto end_rename;
 			retval = -ENOTEMPTY;
 			if (!empty_dir(new_inode))
 				goto end_rename;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)