]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/dcache.c
vfs: fix bad hashing of dentries
[mirror_ubuntu-bionic-kernel.git] / fs / dcache.c
index d30ce699ae4b6ea4ac3ad1b8ec955fa271bdcb16..4023e77b800e85ab3fc1d7ea525fb04f6174152d 100644 (file)
@@ -106,8 +106,7 @@ static inline struct hlist_bl_head *d_hash(const struct dentry *parent,
                                        unsigned int hash)
 {
        hash += (unsigned long) parent / L1_CACHE_BYTES;
-       hash = hash + (hash >> d_hash_shift);
-       return dentry_hashtable + (hash & d_hash_mask);
+       return dentry_hashtable + hash_32(hash, d_hash_shift);
 }
 
 /* Statistics gathering. */