Lines Matching defs: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);
360 static int cachefiles_write(struct netfs_cache_resources *cres,
366 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) {
372 return __cachefiles_write(cachefiles_cres_object(cres),
373 cachefiles_cres_file(cres),
379 cachefiles_do_prepare_read(struct netfs_cache_resources *cres,
386 struct fscache_cookie *cookie = fscache_cres_cookie(cres);
388 struct file *file = cachefiles_cres_file(cres);
413 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ))
415 file = cachefiles_cres_file(cres);
421 object = cachefiles_cres_object(cres);
509 cachefiles_prepare_ondemand_read(struct netfs_cache_resources *cres,
513 return cachefiles_do_prepare_read(cres, start, _len, i_size, _flags, ino);
594 static int cachefiles_prepare_write(struct netfs_cache_resources *cres,
598 struct cachefiles_object *object = cachefiles_cres_object(cres);
603 if (!cachefiles_cres_file(cres)) {
604 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE))
606 if (!cachefiles_cres_file(cres))
611 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres),
621 static void cachefiles_end_operation(struct netfs_cache_resources *cres)
623 struct file *file = cachefiles_cres_file(cres);
627 fscache_end_cookie_access(fscache_cres_cookie(cres), fscache_access_io_end);
643 bool cachefiles_begin_operation(struct netfs_cache_resources *cres,
646 struct cachefiles_object *object = cachefiles_cres_object(cres);
648 if (!cachefiles_cres_file(cres)) {
649 cres->ops = &cachefiles_netfs_cache_ops;
652 if (!cres->cache_priv2 && object->file)
653 cres->cache_priv2 = get_file(object->file);
658 if (!cachefiles_cres_file(cres) && want_state != FSCACHE_WANT_PARAMS) {
659 pr_err("failed to get cres->file\n");