Lines Matching refs:cres

73 static int cachefiles_read(struct netfs_cache_resources *cres,  in cachefiles_read()  argument
87 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ)) in cachefiles_read()
91 object = cachefiles_cres_object(cres); in cachefiles_read()
92 file = cachefiles_cres_file(cres); in cachefiles_read()
144 ki->inval_counter = cres->inval_counter; in cachefiles_read()
197 static int cachefiles_query_occupancy(struct netfs_cache_resources *cres, in cachefiles_query_occupancy() argument
208 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ)) in cachefiles_query_occupancy()
211 object = cachefiles_cres_object(cres); in cachefiles_query_occupancy()
212 file = cachefiles_cres_file(cres); in cachefiles_query_occupancy()
370 static int cachefiles_write(struct netfs_cache_resources *cres, in cachefiles_write() argument
376 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) { in cachefiles_write()
382 return __cachefiles_write(cachefiles_cres_object(cres), in cachefiles_write()
383 cachefiles_cres_file(cres), in cachefiles_write()
397 struct netfs_cache_resources *cres = &rreq->cache_resources; in cachefiles_prepare_read() local
400 struct fscache_cookie *cookie = fscache_cres_cookie(cres); in cachefiles_prepare_read()
402 struct file *file = cachefiles_cres_file(cres); in cachefiles_prepare_read()
426 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_READ)) in cachefiles_prepare_read()
428 file = cachefiles_cres_file(cres); in cachefiles_prepare_read()
434 object = cachefiles_cres_object(cres); in cachefiles_prepare_read()
582 static int cachefiles_prepare_write(struct netfs_cache_resources *cres, in cachefiles_prepare_write() argument
586 struct cachefiles_object *object = cachefiles_cres_object(cres); in cachefiles_prepare_write()
591 if (!cachefiles_cres_file(cres)) { in cachefiles_prepare_write()
592 if (!fscache_wait_for_operation(cres, FSCACHE_WANT_WRITE)) in cachefiles_prepare_write()
594 if (!cachefiles_cres_file(cres)) in cachefiles_prepare_write()
599 ret = __cachefiles_prepare_write(object, cachefiles_cres_file(cres), in cachefiles_prepare_write()
609 static void cachefiles_end_operation(struct netfs_cache_resources *cres) in cachefiles_end_operation() argument
611 struct file *file = cachefiles_cres_file(cres); in cachefiles_end_operation()
615 fscache_end_cookie_access(fscache_cres_cookie(cres), fscache_access_io_end); in cachefiles_end_operation()
630 bool cachefiles_begin_operation(struct netfs_cache_resources *cres, in cachefiles_begin_operation() argument
633 struct cachefiles_object *object = cachefiles_cres_object(cres); in cachefiles_begin_operation()
635 if (!cachefiles_cres_file(cres)) { in cachefiles_begin_operation()
636 cres->ops = &cachefiles_netfs_cache_ops; in cachefiles_begin_operation()
639 if (!cres->cache_priv2 && object->file) in cachefiles_begin_operation()
640 cres->cache_priv2 = get_file(object->file); in cachefiles_begin_operation()
645 if (!cachefiles_cres_file(cres) && want_state != FSCACHE_WANT_PARAMS) { in cachefiles_begin_operation()