Lines Matching defs:cres
17 * @cres: The cache resources for the operation being performed
23 bool fscache_wait_for_operation(struct netfs_cache_resources *cres,
26 struct fscache_cookie *cookie = fscache_cres_cookie(cres);
60 if (!cres->cache_priv2)
61 return cookie->volume->cache->ops->begin_operation(cres, want_state);
71 static int fscache_begin_operation(struct netfs_cache_resources *cres,
80 cres->ops = NULL;
81 cres->cache_priv = cookie;
82 cres->cache_priv2 = NULL;
83 cres->debug_id = cookie->debug_id;
84 cres->inval_counter = cookie->inval_counter;
116 if (!cookie->volume->cache->ops->begin_operation(cres, want_state))
138 cres->cache_priv = NULL;
139 cres->ops = NULL;
145 int __fscache_begin_read_operation(struct netfs_cache_resources *cres,
148 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS,
153 int __fscache_begin_write_operation(struct netfs_cache_resources *cres,
156 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS,
256 struct netfs_cache_resources *cres;
275 cres = &wreq->cache_resources;
276 if (fscache_begin_operation(cres, cookie, FSCACHE_WANT_WRITE,
280 ret = cres->ops->prepare_write(cres, &start, &len, i_size, false);
290 fscache_write(cres, start, &iter, fscache_wreq_done, wreq);
309 struct netfs_cache_resources cres;
312 if (fscache_begin_operation(&cres, cookie, FSCACHE_WANT_WRITE,
321 cookie->volume->cache->ops->resize_cookie(&cres, new_size);
322 fscache_end_operation(&cres);