42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Date: Wed, 24 Sep 2014 12:27:39 -0700
|
|
Subject: fold swapping ->d_name.hash into switch_names()
|
|
Origin: https://git.kernel.org/linus/a28ddb87cdddb0db57466ba7f59f831002f4340c
|
|
|
|
and do it along with ->d_name.len there
|
|
|
|
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
|
[bwh: Backported to 3.16: change __d_materialise_dentry() as well]
|
|
---
|
|
fs/dcache.c | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
--- a/fs/dcache.c
|
|
+++ b/fs/dcache.c
|
|
@@ -2441,7 +2441,7 @@ static void switch_names(struct dentry *
|
|
}
|
|
}
|
|
}
|
|
- swap(dentry->d_name.len, target->d_name.len);
|
|
+ swap(dentry->d_name.hash_len, target->d_name.hash_len);
|
|
}
|
|
|
|
static void dentry_lock_for_move(struct dentry *dentry, struct dentry *target)
|
|
@@ -2540,7 +2540,6 @@ static void __d_move(struct dentry *dent
|
|
|
|
/* Switch the names.. */
|
|
switch_names(dentry, target);
|
|
- swap(dentry->d_name.hash, target->d_name.hash);
|
|
|
|
/* ... and switch the parents */
|
|
if (IS_ROOT(dentry)) {
|
|
@@ -2679,7 +2678,6 @@ static void __d_materialise_dentry(struc
|
|
dparent = dentry->d_parent;
|
|
|
|
switch_names(dentry, anon);
|
|
- swap(dentry->d_name.hash, anon->d_name.hash);
|
|
|
|
dentry->d_parent = dentry;
|
|
list_del_init(&dentry->d_u.d_child);
|