summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2017-11-20 18:05:07 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-01-25 19:34:29 -0500
commit854d3e63438d72cde8296a4c4564898c5f9dd01a (patch)
tree73e0003c4f9e419628448caddd5a9b09d1b9a0f6 /fs/dcache.c
parent01950a349ec254f28bf9ad06e74a166521d213e1 (diff)
dcache: subtract d_hash_shift from 32 in advance
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 17e6b84b9656..d4f5b52d99be 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -110,7 +110,7 @@ static struct hlist_bl_head *dentry_hashtable __read_mostly;
static inline struct hlist_bl_head *d_hash(unsigned int hash)
{
- return dentry_hashtable + (hash >> (32 - d_hash_shift));
+ return dentry_hashtable + (hash >> d_hash_shift);
}
#define IN_LOOKUP_SHIFT 10
@@ -3593,6 +3593,7 @@ static void __init dcache_init_early(void)
&d_hash_mask,
0,
0);
+ d_hash_shift = 32 - d_hash_shift;
}
static void __init dcache_init(void)
@@ -3619,6 +3620,7 @@ static void __init dcache_init(void)
&d_hash_mask,
0,
0);
+ d_hash_shift = 32 - d_hash_shift;
}
/* SLAB cache for __getname() consumers */