mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
fs/dcache.c: Save one 32-bit multiply in dcache lookup
Noe that we're mixing in the parent pointer earlier, we don't need to use hash_32() to mix its bits. Instead, we can just take the msbits of the hash value directly. For those applications which use the partial_name_hash(), move the multiply to end_name_hash. Signed-off-by: George Spelvin <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
8387ff2577
commit
703b5faf22
2 changed files with 5 additions and 3 deletions
|
|
@ -106,7 +106,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(hash, d_hash_shift);
|
||||
return dentry_hashtable + (hash >> (32 - d_hash_shift));
|
||||
}
|
||||
|
||||
#define IN_LOOKUP_SHIFT 10
|
||||
|
|
|
|||
Loading…
Reference in a new issue