Lines Matching defs:cache

25 static int fscache_alloc_object(struct fscache_cache *cache,
232 * - other objects are stored in a selected cache immediately, and all the
385 struct fscache_cache *cache;
402 /* select a cache in which to store the object */
403 cache = fscache_select_cache_for_object(cookie->parent);
404 if (!cache) {
407 _leave(" = -ENOMEDIUM [no cache]");
411 _debug("cache %s", cache->tag->name);
415 /* ask the cache to allocate objects for this cookie and its parent
417 ret = fscache_alloc_object(cache, cookie);
462 * recursively allocate cache object records for a cookie/cache combination
465 static int fscache_alloc_object(struct fscache_cache *cache,
471 _enter("%p,%p{%s}", cache, cookie, cookie->def->name);
476 if (object->cache == cache)
481 /* ask the cache to allocate an object (we may end up with duplicate
484 object = cache->ops->alloc_object(cache, cookie);
500 ret = fscache_alloc_object(cache, cookie->parent);
509 cache->ops->put_object(object, fscache_obj_put_attach_fail);
529 cache->ops->put_object(object, fscache_obj_put_alloc_fail);
537 * attach a cache object to a cookie
543 struct fscache_cache *cache = object->cache;
556 if (p->cache == object->cache) {
567 if (p->cache == object->cache) {
582 /* attach to the cache's object list */
584 spin_lock(&cache->object_list_lock);
585 list_add(&object->cache_link, &cache->object_list);
586 spin_unlock(&cache->object_list_lock);
680 /* update the index entry on disk in each cache backing this
775 * release a cookie back to the cache
872 * check the consistency between the netfs inode and the backing cache
913 if (test_bit(FSCACHE_IOERROR, &object->cache->flags))
927 /* ask the cache to honour the operation */
928 ret = object->cache->ops->check_consistency(op);