• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/fscache/

Lines Matching defs:tag

25  * look up a cache tag
29 struct fscache_cache_tag *tag, *xtag;
31 /* firstly check for the existence of the tag under read lock */
34 list_for_each_entry(tag, &fscache_cache_tag_list, link) {
35 if (strcmp(tag->name, name) == 0) {
36 atomic_inc(&tag->usage);
38 return tag;
44 /* the tag does not exist - create a candidate */
47 /* return a dummy tag if out of memory */
56 list_for_each_entry(tag, &fscache_cache_tag_list, link) {
57 if (strcmp(tag->name, name) == 0) {
58 atomic_inc(&tag->usage);
61 return tag;
71 * release a reference to a cache tag
73 void __fscache_release_cache_tag(struct fscache_cache_tag *tag)
75 if (tag != ERR_PTR(-ENOMEM)) {
78 if (atomic_dec_and_test(&tag->usage))
79 list_del_init(&tag->link);
81 tag = NULL;
85 kfree(tag);
97 struct fscache_cache_tag *tag;
141 tag = cookie->def->select_cache(cookie->parent->netfs_data,
143 if (!tag)
146 if (tag == ERR_PTR(-ENOMEM)) {
147 _leave(" = NULL [nomem tag]");
151 if (!tag->cache) {
152 _leave(" = NULL [unbacked tag]");
156 if (test_bit(FSCACHE_IOERROR, &tag->cache->flags))
159 _leave(" = %p [specific]", tag->cache);
160 return tag->cache;
210 * @tagname: The tag describing this cache
221 struct fscache_cache_tag *tag;
237 /* we use the cache tag to uniquely identify caches */
238 tag = __fscache_lookup_cache_tag(tagname);
239 if (IS_ERR(tag))
242 if (test_and_set_bit(FSCACHE_TAG_RESERVED, &tag->flags))
255 tag->cache = cache;
256 cache->tag = tag;
282 cache->tag->name, cache->ops->name);
289 printk(KERN_ERR "FS-Cache: Cache tag '%s' already in use\n", tagname);
290 __fscache_release_cache_tag(tag);
295 __fscache_release_cache_tag(tag);
371 cache->tag->name);
379 cache->tag->cache = NULL;
414 clear_bit(FSCACHE_TAG_RESERVED, &cache->tag->flags);
415 fscache_release_cache_tag(cache->tag);
416 cache->tag = NULL;