• Home
  • Raw
  • Download

Lines Matching refs:tag

29 	struct fscache_cache_tag *tag, *xtag;  in __fscache_lookup_cache_tag()  local
34 list_for_each_entry(tag, &fscache_cache_tag_list, link) { in __fscache_lookup_cache_tag()
35 if (strcmp(tag->name, name) == 0) { in __fscache_lookup_cache_tag()
36 atomic_inc(&tag->usage); in __fscache_lookup_cache_tag()
38 return tag; in __fscache_lookup_cache_tag()
56 list_for_each_entry(tag, &fscache_cache_tag_list, link) { in __fscache_lookup_cache_tag()
57 if (strcmp(tag->name, name) == 0) { in __fscache_lookup_cache_tag()
58 atomic_inc(&tag->usage); in __fscache_lookup_cache_tag()
61 return tag; in __fscache_lookup_cache_tag()
73 void __fscache_release_cache_tag(struct fscache_cache_tag *tag) in __fscache_release_cache_tag() argument
75 if (tag != ERR_PTR(-ENOMEM)) { in __fscache_release_cache_tag()
78 if (atomic_dec_and_test(&tag->usage)) in __fscache_release_cache_tag()
79 list_del_init(&tag->link); in __fscache_release_cache_tag()
81 tag = NULL; in __fscache_release_cache_tag()
85 kfree(tag); in __fscache_release_cache_tag()
97 struct fscache_cache_tag *tag; in fscache_select_cache_for_object() local
141 tag = cookie->def->select_cache(cookie->parent->netfs_data, in fscache_select_cache_for_object()
143 if (!tag) in fscache_select_cache_for_object()
146 if (tag == ERR_PTR(-ENOMEM)) { in fscache_select_cache_for_object()
151 if (!tag->cache) { in fscache_select_cache_for_object()
156 if (test_bit(FSCACHE_IOERROR, &tag->cache->flags)) in fscache_select_cache_for_object()
159 _leave(" = %p [specific]", tag->cache); in fscache_select_cache_for_object()
160 return tag->cache; in fscache_select_cache_for_object()
221 struct fscache_cache_tag *tag; in fscache_add_cache() local
240 tag = __fscache_lookup_cache_tag(tagname); in fscache_add_cache()
241 if (IS_ERR(tag)) in fscache_add_cache()
244 if (test_and_set_bit(FSCACHE_TAG_RESERVED, &tag->flags)) in fscache_add_cache()
257 tag->cache = cache; in fscache_add_cache()
258 cache->tag = tag; in fscache_add_cache()
284 cache->tag->name, cache->ops->name); in fscache_add_cache()
292 __fscache_release_cache_tag(tag); in fscache_add_cache()
297 __fscache_release_cache_tag(tag); in fscache_add_cache()
372 cache->tag->name); in fscache_withdraw_cache()
380 cache->tag->cache = NULL; in fscache_withdraw_cache()
415 clear_bit(FSCACHE_TAG_RESERVED, &cache->tag->flags); in fscache_withdraw_cache()
416 fscache_release_cache_tag(cache->tag); in fscache_withdraw_cache()
417 cache->tag = NULL; in fscache_withdraw_cache()