Skip to content

Commit 3010f06

Browse files
author
Al Viro
committed
shmem_whiteout(): fix regression from tree-in-dcache series
Now that shmem_mknod() hashes the new dentry, d_rehash() in shmem_whiteout() should be removed. X-paperbag: brown Reported-by: Hugh Dickins <hughd@google.com> Acked-by: Hugh Dickins <hughd@google.com> Tested-by: Hugh Dickins <hughd@google.com> Fixes: 2313598 ("convert ramfs and tmpfs") Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 0048fbb commit 3010f06

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

mm/shmem.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4019,22 +4019,10 @@ static int shmem_whiteout(struct mnt_idmap *idmap,
40194019
whiteout = d_alloc(old_dentry->d_parent, &old_dentry->d_name);
40204020
if (!whiteout)
40214021
return -ENOMEM;
4022-
40234022
error = shmem_mknod(idmap, old_dir, whiteout,
40244023
S_IFCHR | WHITEOUT_MODE, WHITEOUT_DEV);
40254024
dput(whiteout);
4026-
if (error)
4027-
return error;
4028-
4029-
/*
4030-
* Cheat and hash the whiteout while the old dentry is still in
4031-
* place, instead of playing games with FS_RENAME_DOES_D_MOVE.
4032-
*
4033-
* d_lookup() will consistently find one of them at this point,
4034-
* not sure which one, but that isn't even important.
4035-
*/
4036-
d_rehash(whiteout);
4037-
return 0;
4025+
return error;
40384026
}
40394027

40404028
/*

0 commit comments

Comments
 (0)