Lines Matching refs:hash
309 unsigned long hash = init_name_hash(ns); in kernfs_name_hash() local
312 hash = partial_name_hash(*name++, hash); in kernfs_name_hash()
313 hash = end_name_hash(hash); in kernfs_name_hash()
314 hash &= 0x7fffffffU; in kernfs_name_hash()
316 if (hash < 2) in kernfs_name_hash()
317 hash += 2; in kernfs_name_hash()
318 if (hash >= INT_MAX) in kernfs_name_hash()
319 hash = INT_MAX - 1; in kernfs_name_hash()
320 return hash; in kernfs_name_hash()
323 static int kernfs_name_compare(unsigned int hash, const char *name, in kernfs_name_compare() argument
326 if (hash < kn->hash) in kernfs_name_compare()
328 if (hash > kn->hash) in kernfs_name_compare()
340 return kernfs_name_compare(left->hash, left->name, left->ns, right); in kernfs_sd_compare()
807 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_add_one()
853 unsigned int hash; in kernfs_find_ns() local
863 hash = kernfs_name_hash(name, ns); in kernfs_find_ns()
869 result = kernfs_name_compare(hash, name, ns, kn); in kernfs_find_ns()
1614 kn->hash = kernfs_name_hash(kn->name, kn->ns); in kernfs_rename_ns()
1639 struct kernfs_node *parent, loff_t hash, struct kernfs_node *pos) in kernfs_dir_pos() argument
1643 pos->parent == parent && hash == pos->hash; in kernfs_dir_pos()
1648 if (!pos && (hash > 1) && (hash < INT_MAX)) { in kernfs_dir_pos()
1653 if (hash < pos->hash) in kernfs_dir_pos()
1655 else if (hash > pos->hash) in kernfs_dir_pos()
1710 ctx->pos = pos->hash; in kernfs_fop_readdir()