Lines Matching refs:hash
210 unsigned long hash = init_name_hash(); in kernfs_name_hash() local
213 hash = partial_name_hash(*name++, hash); in kernfs_name_hash()
214 hash = (end_name_hash(hash) ^ hash_ptr((void *)ns, 31)); in kernfs_name_hash()
215 hash &= 0x7fffffffU; in kernfs_name_hash()
217 if (hash < 2) in kernfs_name_hash()
218 hash += 2; in kernfs_name_hash()
219 if (hash >= INT_MAX) in kernfs_name_hash()
220 hash = INT_MAX - 1; in kernfs_name_hash()
221 return hash; in kernfs_name_hash()
224 static int kernfs_name_compare(unsigned int hash, const char *name, in kernfs_name_compare() argument
227 if (hash < kn->hash) in kernfs_name_compare()
229 if (hash > kn->hash) in kernfs_name_compare()
241 return kernfs_name_compare(left->hash, left->name, left->ns, right); in kernfs_sd_compare()
624 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_add_one()
670 unsigned int hash; in kernfs_find_ns() local
680 hash = kernfs_name_hash(name, ns); in kernfs_find_ns()
686 result = kernfs_name_compare(hash, name, ns, kn); in kernfs_find_ns()
1358 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_rename_ns()
1383 struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos) in kernfs_dir_pos() argument
1387 pos->parent == parent && hash == pos->hash; in kernfs_dir_pos()
1392 if (!pos && (hash > 1) && (hash < INT_MAX)) { in kernfs_dir_pos()
1397 if (hash < pos->hash) in kernfs_dir_pos()
1399 else if (hash > pos->hash) in kernfs_dir_pos()
1454 ctx->pos = pos->hash; in kernfs_fop_readdir()