Lines Matching defs:cres

75 static int cachefiles_read(struct netfs_cache_resources *cres,
89 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ))
93 object = cachefiles_cres_object(cres);
94 file = cachefiles_cres_file(cres);
146 ki->inval_counter = cres->inval_counter;
199 static int cachefiles_query_occupancy(struct netfs_cache_resources *cres,
210 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ))
213 object = cachefiles_cres_object(cres);
214 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)) {
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);
602 static int cachefiles_prepare_write(struct netfs_cache_resources *cres,
606 struct cachefiles_object *object = cachefiles_cres_object(cres);
611 if (!cachefiles_cres_file(cres)) {
612 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE))
614 if (!cachefiles_cres_file(cres))
619 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres),
629 struct netfs_cache_resources *cres = &wreq->cache_resources;
637 if (!cachefiles_cres_file(cres)) {
638 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE))
640 if (!cachefiles_cres_file(cres))
648 struct netfs_cache_resources *cres = &wreq->cache_resources;
649 struct cachefiles_object *object = cachefiles_cres_object(cres);
700 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres),
717 static void cachefiles_end_operation(struct netfs_cache_resources *cres)
719 struct file *file = cachefiles_cres_file(cres);
723 fscache_end_cookie_access(fscache_cres_cookie(cres), fscache_access_io_end);
741 bool cachefiles_begin_operation(struct netfs_cache_resources *cres,
744 struct cachefiles_object *object = cachefiles_cres_object(cres);
746 if (!cachefiles_cres_file(cres)) {
747 cres->ops = &cachefiles_netfs_cache_ops;
750 if (!cres->cache_priv2 && object->file)
751 cres->cache_priv2 = get_file(object->file);
756 if (!cachefiles_cres_file(cres) && want_state != FSCACHE_WANT_PARAMS) {
757 pr_err("failed to get cres->file\n");