patch-2.1.132 linux/fs/vfat/namei.c

Next file: linux/include/asm-alpha/dma.h
Previous file: linux/fs/umsdos/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.131/linux/fs/vfat/namei.c linux/fs/vfat/namei.c
@@ -1416,12 +1416,6 @@
 	struct super_block *sb = dir->i_sb;
 	int res;
 
-	if (!S_ISDIR(dentry->d_inode->i_mode)) {
-		return -ENOTDIR;
-	}
-	if (dir->i_dev != dentry->d_inode->i_dev || dir == dentry->d_inode) {
-		return -EBUSY;
-	}
 	if (!list_empty(&dentry->d_hash))
 		return -EBUSY;
 
@@ -1814,6 +1808,10 @@
 
 	if (res == 0) {
 		drop_replace_inodes(old_dentry, new_inode);
+		list_del(&old_dentry->d_alias);
+		iput(old_dentry->d_inode);
+		d_instantiate(old_dentry, new_inode);
+
 		d_move(old_dentry, new_dentry);
 		put_new_inode = 0;
 	}

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