Lines Matching refs:cache
399 rpcauth_clear_credcache(struct rpc_cred_cache *cache) in rpcauth_clear_credcache() argument
404 unsigned int hashsize = 1U << cache->hashbits; in rpcauth_clear_credcache()
408 spin_lock(&cache->lock); in rpcauth_clear_credcache()
410 head = &cache->hashtable[i]; in rpcauth_clear_credcache()
422 spin_unlock(&cache->lock); in rpcauth_clear_credcache()
433 struct rpc_cred_cache *cache = auth->au_credcache; in rpcauth_destroy_credcache() local
435 if (cache) { in rpcauth_destroy_credcache()
437 rpcauth_clear_credcache(cache); in rpcauth_destroy_credcache()
438 kfree(cache->hashtable); in rpcauth_destroy_credcache()
439 kfree(cache); in rpcauth_destroy_credcache()
549 struct rpc_cred_cache *cache = auth->au_credcache; in rpcauth_lookup_credcache() local
554 nr = hash_long(from_kuid(&init_user_ns, acred->uid), cache->hashbits); in rpcauth_lookup_credcache()
557 hlist_for_each_entry_rcu(entry, &cache->hashtable[nr], cr_hash) { in rpcauth_lookup_credcache()
566 spin_lock(&cache->lock); in rpcauth_lookup_credcache()
568 spin_unlock(&cache->lock); in rpcauth_lookup_credcache()
572 spin_unlock(&cache->lock); in rpcauth_lookup_credcache()
589 spin_lock(&cache->lock); in rpcauth_lookup_credcache()
590 hlist_for_each_entry(entry, &cache->hashtable[nr], cr_hash) { in rpcauth_lookup_credcache()
599 hlist_add_head_rcu(&cred->cr_hash, &cache->hashtable[nr]); in rpcauth_lookup_credcache()
602 spin_unlock(&cache->lock); in rpcauth_lookup_credcache()