Lines Matching refs:hash
301 unsigned long hash = init_name_hash(ns); in kernfs_name_hash() local
304 hash = partial_name_hash(*name++, hash); in kernfs_name_hash()
305 hash = end_name_hash(hash); in kernfs_name_hash()
306 hash &= 0x7fffffffU; in kernfs_name_hash()
308 if (hash < 2) in kernfs_name_hash()
309 hash += 2; in kernfs_name_hash()
310 if (hash >= INT_MAX) in kernfs_name_hash()
311 hash = INT_MAX - 1; in kernfs_name_hash()
312 return hash; in kernfs_name_hash()
315 static int kernfs_name_compare(unsigned int hash, const char *name, in kernfs_name_compare() argument
318 if (hash < kn->hash) in kernfs_name_compare()
320 if (hash > kn->hash) in kernfs_name_compare()
332 return kernfs_name_compare(left->hash, left->name, left->ns, right); in kernfs_sd_compare()
791 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_add_one()
837 unsigned int hash; in kernfs_find_ns() local
847 hash = kernfs_name_hash(name, ns); in kernfs_find_ns()
853 result = kernfs_name_compare(hash, name, ns, kn); in kernfs_find_ns()
1586 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_rename_ns()
1611 struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos) in kernfs_dir_pos() argument
1615 pos->parent == parent && hash == pos->hash; in kernfs_dir_pos()
1620 if (!pos && (hash > 1) && (hash < INT_MAX)) { in kernfs_dir_pos()
1625 if (hash < pos->hash) in kernfs_dir_pos()
1627 else if (hash > pos->hash) in kernfs_dir_pos()
1682 ctx->pos = pos->hash; in kernfs_fop_readdir()