Skip to content

Commit a28ddb8

Browse files
torvaldsAl Viro
authored andcommitted
fold swapping ->d_name.hash into switch_names()
and do it along with ->d_name.len there Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 986c019 commit a28ddb8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/dcache.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ static void switch_names(struct dentry *dentry, struct dentry *target)
24122412
}
24132413
}
24142414
}
2415-
swap(dentry->d_name.len, target->d_name.len);
2415+
swap(dentry->d_name.hash_len, target->d_name.hash_len);
24162416
}
24172417

24182418
static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target)
@@ -2510,7 +2510,6 @@ static void __d_move(struct dentry *dentry, struct dentry *target,
25102510

25112511
/* Switch the names.. */
25122512
switch_names(dentry, target);
2513-
swap(dentry->d_name.hash, target->d_name.hash);
25142513

25152514
/* ... and switch them in the tree */
25162515
if (IS_ROOT(dentry)) {

0 commit comments

Comments
 (0)