Lines Matching refs: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;
87 cres->cache_priv = NULL;
118 if (!cookie->volume->cache->ops->begin_operation(cres, want_state))
140 cres->cache_priv = NULL;
141 cres->ops = NULL;
147 int __fscache_begin_read_operation(struct netfs_cache_resources *cres,
150 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS,
155 int __fscache_begin_write_operation(struct netfs_cache_resources *cres,
158 return fscache_begin_operation(cres, cookie, FSCACHE_WANT_PARAMS,
218 struct netfs_cache_resources *cres;
237 cres = &wreq->cache_resources;
238 if (fscache_begin_operation(cres, cookie, FSCACHE_WANT_WRITE,
242 ret = cres->ops->prepare_write(cres, &start, &len, len, i_size, false);
252 fscache_write(cres, start, &iter, fscache_wreq_done, wreq);
271 struct netfs_cache_resources cres;
274 if (fscache_begin_operation(&cres, cookie, FSCACHE_WANT_WRITE,
283 cookie->volume->cache->ops->resize_cookie(&cres, new_size);
284 fscache_end_operation(&cres);