Lines Matching refs:hash
32 struct hash { struct
53 struct hash chash; argument
83 static int alloc_hash(struct hash *hash, unsigned elts) in alloc_hash() argument
85 hash->nr_buckets = next_power(elts >> 4, 16); in alloc_hash()
86 hash->hash_bits = __ffs(hash->nr_buckets); in alloc_hash()
87 hash->table = vzalloc(sizeof(*hash->table) * hash->nr_buckets); in alloc_hash()
89 return hash->table ? 0 : -ENOMEM; in alloc_hash()
92 static void free_hash(struct hash *hash) in free_hash() argument
94 vfree(hash->table); in free_hash()
142 struct hash *hash = &p->chash; in lookup_cache_entry() local
143 unsigned h = hash_64(from_oblock(oblock), hash->hash_bits); in lookup_cache_entry()
145 struct hlist_head *bucket = &hash->table[h]; in lookup_cache_entry()