• Home
  • Raw
  • Download

Lines Matching refs:entry

101 static void calipso_cache_entry_free(struct calipso_map_cache_entry *entry)  in calipso_cache_entry_free()  argument
103 if (entry->lsm_data) in calipso_cache_entry_free()
104 netlbl_secattr_cache_free(entry->lsm_data); in calipso_cache_entry_free()
105 kfree(entry->key); in calipso_cache_entry_free()
106 kfree(entry); in calipso_cache_entry_free()
161 struct calipso_map_cache_entry *entry, *tmp_entry; in calipso_cache_invalidate() local
166 list_for_each_entry_safe(entry, in calipso_cache_invalidate()
169 list_del(&entry->list); in calipso_cache_invalidate()
170 calipso_cache_entry_free(entry); in calipso_cache_invalidate()
204 struct calipso_map_cache_entry *entry; in calipso_cache_check() local
214 list_for_each_entry(entry, &calipso_cache[bkt].list, list) { in calipso_cache_check()
215 if (entry->hash == hash && in calipso_cache_check()
216 entry->key_len == key_len && in calipso_cache_check()
217 memcmp(entry->key, key, key_len) == 0) { in calipso_cache_check()
218 entry->activity += 1; in calipso_cache_check()
219 refcount_inc(&entry->lsm_data->refcount); in calipso_cache_check()
220 secattr->cache = entry->lsm_data; in calipso_cache_check()
230 if (entry->activity > prev_entry->activity && in calipso_cache_check()
231 entry->activity - prev_entry->activity > in calipso_cache_check()
233 __list_del(entry->list.prev, entry->list.next); in calipso_cache_check()
234 __list_add(&entry->list, in calipso_cache_check()
242 prev_entry = entry; in calipso_cache_check()
269 struct calipso_map_cache_entry *entry = NULL; in calipso_cache_add() local
278 entry = kzalloc(sizeof(*entry), GFP_ATOMIC); in calipso_cache_add()
279 if (!entry) in calipso_cache_add()
281 entry->key = kmemdup(calipso_ptr + 2, calipso_ptr_len, GFP_ATOMIC); in calipso_cache_add()
282 if (!entry->key) { in calipso_cache_add()
286 entry->key_len = calipso_ptr_len; in calipso_cache_add()
287 entry->hash = calipso_map_cache_hash(calipso_ptr, calipso_ptr_len); in calipso_cache_add()
289 entry->lsm_data = secattr->cache; in calipso_cache_add()
291 bkt = entry->hash & (CALIPSO_CACHE_BUCKETS - 1); in calipso_cache_add()
294 list_add(&entry->list, &calipso_cache[bkt].list); in calipso_cache_add()
300 list_add(&entry->list, &calipso_cache[bkt].list); in calipso_cache_add()
308 if (entry) in calipso_cache_add()
309 calipso_cache_entry_free(entry); in calipso_cache_add()
418 static void calipso_doi_free_rcu(struct rcu_head *entry) in calipso_doi_free_rcu() argument
422 doi_def = container_of(entry, struct calipso_doi, rcu); in calipso_doi_free_rcu()