Lines Matching defs:cres

26 #define fscache_resources_valid(cres) ((cres)->cache_priv)
33 #define fscache_resources_valid(cres) (false)
421 * @cres: The resources to check.
426 const struct netfs_cache_ops *fscache_operation_valid(const struct netfs_cache_resources *cres)
428 return fscache_resources_valid(cres) ? cres->ops : NULL;
433 * @cres: The cache resources for the read being performed
436 * Begin a read operation on behalf of the netfs helper library. @cres
440 * @cres->inval_counter is set from @cookie->inval_counter for comparison at
450 int fscache_begin_read_operation(struct netfs_cache_resources *cres,
454 return __fscache_begin_read_operation(cres, cookie);
460 * @cres: The cache resources for the read operation
464 static inline void fscache_end_operation(struct netfs_cache_resources *cres)
466 const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
469 ops->end_operation(cres);
474 * @cres: The cache resources to use
481 * Start a read from the cache. @cres indicates the cache object to read from
504 int fscache_read(struct netfs_cache_resources *cres,
511 const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
512 return ops->read(cres, start_pos, iter, read_hole,
518 * @cres: The cache resources for the write being performed
521 * Begin a write operation on behalf of the netfs helper library. @cres
525 * @cres->inval_counter is set from @cookie->inval_counter for comparison at
535 int fscache_begin_write_operation(struct netfs_cache_resources *cres,
539 return __fscache_begin_write_operation(cres, cookie);
545 * @cres: The cache resources to use
551 * Start a write to the cache. @cres indicates the cache object to write to and
563 int fscache_write(struct netfs_cache_resources *cres,
569 const struct netfs_cache_ops *ops = fscache_operation_valid(cres);
570 return ops->write(cres, start_pos, iter, term_func, term_func_priv);