Lines Matching refs:cres

75 static int cachefiles_read(struct netfs_cache_resources *cres,  in cachefiles_read()  argument
89 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ)) in cachefiles_read()
93 object = cachefiles_cres_object(cres); in cachefiles_read()
94 file = cachefiles_cres_file(cres); in cachefiles_read()
146 ki->inval_counter = cres->inval_counter; in cachefiles_read()
199 static int cachefiles_query_occupancy(struct netfs_cache_resources *cres, in cachefiles_query_occupancy() argument
210 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ)) in cachefiles_query_occupancy()
213 object = cachefiles_cres_object(cres); in cachefiles_query_occupancy()
214 file = cachefiles_cres_file(cres); in cachefiles_query_occupancy()
361 static int cachefiles_write(struct netfs_cache_resources *cres, in cachefiles_write() argument
367 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) { in cachefiles_write()
374 return __cachefiles_write(cachefiles_cres_object(cres), in cachefiles_write()
375 cachefiles_cres_file(cres), in cachefiles_write()
381 cachefiles_do_prepare_read(struct netfs_cache_resources *cres, in cachefiles_do_prepare_read() argument
388 struct fscache_cookie *cookie = fscache_cres_cookie(cres); in cachefiles_do_prepare_read()
390 struct file *file = cachefiles_cres_file(cres); in cachefiles_do_prepare_read()
415 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ)) in cachefiles_do_prepare_read()
417 file = cachefiles_cres_file(cres); in cachefiles_do_prepare_read()
423 object = cachefiles_cres_object(cres); in cachefiles_do_prepare_read()
511 cachefiles_prepare_ondemand_read(struct netfs_cache_resources *cres, in cachefiles_prepare_ondemand_read() argument
515 return cachefiles_do_prepare_read(cres, start, _len, i_size, _flags, ino); in cachefiles_prepare_ondemand_read()
604 static int cachefiles_prepare_write(struct netfs_cache_resources *cres, in cachefiles_prepare_write() argument
608 struct cachefiles_object *object = cachefiles_cres_object(cres); in cachefiles_prepare_write()
613 if (!cachefiles_cres_file(cres)) { in cachefiles_prepare_write()
614 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) in cachefiles_prepare_write()
616 if (!cachefiles_cres_file(cres)) in cachefiles_prepare_write()
621 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres), in cachefiles_prepare_write()
631 struct netfs_cache_resources *cres = &wreq->cache_resources; in cachefiles_prepare_write_subreq() local
639 if (!cachefiles_cres_file(cres)) { in cachefiles_prepare_write_subreq()
640 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) in cachefiles_prepare_write_subreq()
642 if (!cachefiles_cres_file(cres)) in cachefiles_prepare_write_subreq()
650 struct netfs_cache_resources *cres = &wreq->cache_resources; in cachefiles_issue_write() local
651 struct cachefiles_object *object = cachefiles_cres_object(cres); in cachefiles_issue_write()
702 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres), in cachefiles_issue_write()
719 static void cachefiles_end_operation(struct netfs_cache_resources *cres) in cachefiles_end_operation() argument
721 struct file *file = cachefiles_cres_file(cres); in cachefiles_end_operation()
725 fscache_end_cookie_access(fscache_cres_cookie(cres), fscache_access_io_end); in cachefiles_end_operation()
743 bool cachefiles_begin_operation(struct netfs_cache_resources *cres, in cachefiles_begin_operation() argument
746 struct cachefiles_object *object = cachefiles_cres_object(cres); in cachefiles_begin_operation()
748 if (!cachefiles_cres_file(cres)) { in cachefiles_begin_operation()
749 cres->ops = &cachefiles_netfs_cache_ops; in cachefiles_begin_operation()
752 if (!cres->cache_priv2 && object->file) in cachefiles_begin_operation()
753 cres->cache_priv2 = get_file(object->file); in cachefiles_begin_operation()
758 if (!cachefiles_cres_file(cres) && want_state != FSCACHE_WANT_PARAMS) { in cachefiles_begin_operation()