patch-2.1.49 linux/fs/msdos/namei.c

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

diff -u --recursive --new-file v2.1.48/linux/fs/msdos/namei.c linux/fs/msdos/namei.c
@@ -555,8 +555,7 @@
 	}
 	memcpy(old_de->name,new_name,MSDOS_NAME);
 	/* Update the dcache */
-	d_move(old_dentry, new_dentry->d_parent, &new_dentry->d_name);
-	d_delete(new_dentry);
+	d_move(old_dentry, new_dentry);
 set_hid:
 	old_de->attr = is_hid
 		? (old_de->attr | ATTR_HIDDEN)
@@ -583,7 +582,7 @@
 	struct inode *old_inode,*new_inode,*free_inode,*dotdot_inode;
 	struct dentry *walk;
 	int new_ino,free_ino,dotdot_ino;
-	int error,exists,ino;
+	int error,exists;
 
 	if (old_dir->i_dev != new_dir->i_dev) return -EINVAL;
 	if (old_ino == new_dir->i_ino) return -EINVAL;
@@ -684,8 +683,7 @@
 		fat_brelse(sb, dotdot_bh);
 	}
 	/* Update the dcache */
-	d_move(old_dentry, new_dentry->d_parent, &new_dentry->d_name);
-	d_delete(new_dentry);
+	d_move(old_dentry, new_dentry);
 	error = 0;
 rename_done:
 	fat_brelse(sb, free_bh);

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