Lines Matching defs:cache
92 isid->entry.cache = NULL;
502 kfree(rcu_dereference_raw(entry->cache));
556 struct sidtab_str_cache *cache, *victim = NULL;
559 /* do not cache invalid contexts */
565 cache = rcu_dereference_protected(entry->cache,
567 if (cache) {
568 /* entry in cache - just bump to the head of LRU list */
569 list_move(&cache->lru_member, &s->cache_lru_list);
573 cache = kmalloc(sizeof(struct sidtab_str_cache) + str_len, GFP_ATOMIC);
574 if (!cache)
578 /* pop a cache entry from the tail and free it */
582 rcu_assign_pointer(victim->parent->cache, NULL);
586 cache->parent = entry;
587 cache->len = str_len;
588 memcpy(cache->str, str, str_len);
589 list_add(&cache->lru_member, &s->cache_lru_list);
591 rcu_assign_pointer(entry->cache, cache);
601 struct sidtab_str_cache *cache;
605 return -ENOENT; /* do not cache invalid contexts */
609 cache = rcu_dereference(entry->cache);
610 if (!cache) {
613 *out_len = cache->len;
615 *out = kmemdup(cache->str, cache->len, GFP_ATOMIC);