Commit 482db906 authored by Al Viro's avatar Al Viro

dcache.c: get rid of pointless macros

D_HASH{MASK,BITS} are used once each, both in the same function (d_hash()).
At this point they are actively misguiding - they imply that values are
compiler constants, which is no longer true.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2bc74feb
...@@ -96,8 +96,6 @@ static struct kmem_cache *dentry_cache __read_mostly; ...@@ -96,8 +96,6 @@ static struct kmem_cache *dentry_cache __read_mostly;
* This hash-function tries to avoid losing too many bits of hash * This hash-function tries to avoid losing too many bits of hash
* information, yet avoid using a prime hash-size or similar. * information, yet avoid using a prime hash-size or similar.
*/ */
#define D_HASHBITS d_hash_shift
#define D_HASHMASK d_hash_mask
static unsigned int d_hash_mask __read_mostly; static unsigned int d_hash_mask __read_mostly;
static unsigned int d_hash_shift __read_mostly; static unsigned int d_hash_shift __read_mostly;
...@@ -108,8 +106,8 @@ static inline struct hlist_bl_head *d_hash(const struct dentry *parent, ...@@ -108,8 +106,8 @@ static inline struct hlist_bl_head *d_hash(const struct dentry *parent,
unsigned int hash) unsigned int hash)
{ {
hash += (unsigned long) parent / L1_CACHE_BYTES; hash += (unsigned long) parent / L1_CACHE_BYTES;
hash = hash + (hash >> D_HASHBITS); hash = hash + (hash >> d_hash_shift);
return dentry_hashtable + (hash & D_HASHMASK); return dentry_hashtable + (hash & d_hash_mask);
} }
/* Statistics gathering. */ /* Statistics gathering. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment