Lines Matching refs:cres

73 static int cachefiles_read(struct netfs_cache_resources *cres,
87 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ))
91 object = cachefiles_cres_object(cres);
92 file = cachefiles_cres_file(cres);
144 ki->inval_counter = cres->inval_counter;
197 static int cachefiles_query_occupancy(struct netfs_cache_resources *cres,
208 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ))
211 object = cachefiles_cres_object(cres);
212 file = cachefiles_cres_file(cres);
359 static int cachefiles_write(struct netfs_cache_resources *cres,
365 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) {
371 return __cachefiles_write(cachefiles_cres_object(cres),
372 cachefiles_cres_file(cres),
378 cachefiles_do_prepare_read(struct netfs_cache_resources *cres,
385 struct fscache_cookie *cookie = fscache_cres_cookie(cres);
387 struct file *file = cachefiles_cres_file(cres);
412 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ))
414 file = cachefiles_cres_file(cres);
420 object = cachefiles_cres_object(cres);
508 cachefiles_prepare_ondemand_read(struct netfs_cache_resources *cres,
512 return cachefiles_do_prepare_read(cres, start, _len, i_size, _flags, ino);
601 static int cachefiles_prepare_write(struct netfs_cache_resources *cres,
605 struct cachefiles_object *object = cachefiles_cres_object(cres);
610 if (!cachefiles_cres_file(cres)) {
611 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE))
613 if (!cachefiles_cres_file(cres))
618 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres),
628 static void cachefiles_end_operation(struct netfs_cache_resources *cres)
630 struct file *file = cachefiles_cres_file(cres);
634 fscache_end_cookie_access(fscache_cres_cookie(cres), fscache_access_io_end);
650 bool cachefiles_begin_operation(struct netfs_cache_resources *cres,
653 struct cachefiles_object *object = cachefiles_cres_object(cres);
655 if (!cachefiles_cres_file(cres)) {
656 cres->ops = &cachefiles_netfs_cache_ops;
659 if (!cres->cache_priv2 && object->file)
660 cres->cache_priv2 = get_file(object->file);
665 if (!cachefiles_cres_file(cres) && want_state != FSCACHE_WANT_PARAMS) {
666 pr_err("failed to get cres->file\n");