Lines Matching refs:hash
187 unsigned long hash = init_name_hash(); in kernfs_name_hash() local
190 hash = partial_name_hash(*name++, hash); in kernfs_name_hash()
191 hash = (end_name_hash(hash) ^ hash_ptr((void *)ns, 31)); in kernfs_name_hash()
192 hash &= 0x7fffffffU; in kernfs_name_hash()
194 if (hash < 2) in kernfs_name_hash()
195 hash += 2; in kernfs_name_hash()
196 if (hash >= INT_MAX) in kernfs_name_hash()
197 hash = INT_MAX - 1; in kernfs_name_hash()
198 return hash; in kernfs_name_hash()
201 static int kernfs_name_compare(unsigned int hash, const char *name, in kernfs_name_compare() argument
204 if (hash < kn->hash) in kernfs_name_compare()
206 if (hash > kn->hash) in kernfs_name_compare()
218 return kernfs_name_compare(left->hash, left->name, left->ns, right); in kernfs_sd_compare()
601 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_add_one()
647 unsigned int hash; in kernfs_find_ns() local
657 hash = kernfs_name_hash(name, ns); in kernfs_find_ns()
663 result = kernfs_name_compare(hash, name, ns, kn); in kernfs_find_ns()
1335 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_rename_ns()
1360 struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos) in kernfs_dir_pos() argument
1364 pos->parent == parent && hash == pos->hash; in kernfs_dir_pos()
1369 if (!pos && (hash > 1) && (hash < INT_MAX)) { in kernfs_dir_pos()
1374 if (hash < pos->hash) in kernfs_dir_pos()
1376 else if (hash > pos->hash) in kernfs_dir_pos()
1431 ctx->pos = pos->hash; in kernfs_fop_readdir()