Lines Matching defs:cache
110 * struct netlbl_lsm_cache - NetLabel LSM security attribute cache
112 * @free: LSM supplied function to free the cache data
113 * @data: LSM supplied cache data
118 * cache. If the LSM has to perform a lot of translation from the NetLabel
119 * security attributes into it's own internal representation then the cache
121 * overhead on a cache hit.
165 * @cache: NetLabel LSM specific cache
198 struct netlbl_lsm_cache *cache;
224 * @cache_invalidate: invalidate cache
225 * @cache_add: add cache entry
270 * netlbl_secattr_cache_alloc - Allocate and initialize a secattr cache
280 struct netlbl_lsm_cache *cache;
282 cache = kzalloc(sizeof(*cache), flags);
283 if (cache)
284 refcount_set(&cache->refcount, 1);
285 return cache;
290 * @cache: the struct to free
296 static inline void netlbl_secattr_cache_free(struct netlbl_lsm_cache *cache)
298 if (!refcount_dec_and_test(&cache->refcount))
301 if (cache->free)
302 cache->free(cache->data);
303 kfree(cache);
366 netlbl_secattr_cache_free(secattr->cache);
493 * LSM label mapping cache operations