diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2017-11-20 10:05:07 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-01-25 19:34:29 -0500 |
commit | 854d3e63438d72cde8296a4c4564898c5f9dd01a (patch) | |
tree | 73e0003c4f9e419628448caddd5a9b09d1b9a0f6 /fs/dcache.c | |
parent | 01950a349ec254f28bf9ad06e74a166521d213e1 (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.c | 4 |
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; | |||
110 | 110 | ||
111 | static inline struct hlist_bl_head *d_hash(unsigned int hash) | 111 | static inline struct hlist_bl_head *d_hash(unsigned int hash) |
112 | { | 112 | { |
113 | return dentry_hashtable + (hash >> (32 - d_hash_shift)); | 113 | return dentry_hashtable + (hash >> d_hash_shift); |
114 | } | 114 | } |
115 | 115 | ||
116 | #define IN_LOOKUP_SHIFT 10 | 116 | #define IN_LOOKUP_SHIFT 10 |
@@ -3593,6 +3593,7 @@ static void __init dcache_init_early(void) | |||
3593 | &d_hash_mask, | 3593 | &d_hash_mask, |
3594 | 0, | 3594 | 0, |
3595 | 0); | 3595 | 0); |
3596 | d_hash_shift = 32 - d_hash_shift; | ||
3596 | } | 3597 | } |
3597 | 3598 | ||
3598 | static void __init dcache_init(void) | 3599 | static void __init dcache_init(void) |
@@ -3619,6 +3620,7 @@ static void __init dcache_init(void) | |||
3619 | &d_hash_mask, | 3620 | &d_hash_mask, |
3620 | 0, | 3621 | 0, |
3621 | 0); | 3622 | 0); |
3623 | d_hash_shift = 32 - d_hash_shift; | ||
3622 | } | 3624 | } |
3623 | 3625 | ||
3624 | /* SLAB cache for __getname() consumers */ | 3626 | /* SLAB cache for __getname() consumers */ |