drm/rockchip: add DRM_RENDER_ALLOW
[firefly-linux-kernel-4.4.55.git] / include / linux / fscache-cache.h
index 0e26d49972e3369ee707bf80b0656393fde681d7..604e1526cd00a23e27d6a426c8baa6a71bc309c2 100644 (file)
@@ -74,6 +74,7 @@ extern wait_queue_head_t fscache_cache_cleared_wq;
  */
 typedef void (*fscache_operation_release_t)(struct fscache_operation *op);
 typedef void (*fscache_operation_processor_t)(struct fscache_operation *op);
+typedef void (*fscache_operation_cancel_t)(struct fscache_operation *op);
 
 enum fscache_operation_state {
        FSCACHE_OP_ST_BLANK,            /* Op is not yet submitted */
@@ -109,6 +110,9 @@ struct fscache_operation {
         *   the op in a non-pool thread */
        fscache_operation_processor_t processor;
 
+       /* Operation cancellation cleanup (optional) */
+       fscache_operation_cancel_t cancel;
+
        /* operation releaser */
        fscache_operation_release_t release;
 };
@@ -121,6 +125,7 @@ extern void fscache_op_complete(struct fscache_operation *, bool);
 extern void fscache_put_operation(struct fscache_operation *);
 extern void fscache_operation_init(struct fscache_operation *,
                                   fscache_operation_processor_t,
+                                  fscache_operation_cancel_t,
                                   fscache_operation_release_t);
 
 /*
@@ -128,6 +133,7 @@ extern void fscache_operation_init(struct fscache_operation *,
  */
 struct fscache_retrieval {
        struct fscache_operation op;
+       struct fscache_cookie   *cookie;        /* The netfs cookie */
        struct address_space    *mapping;       /* netfs pages */
        fscache_rw_complete_t   end_io_func;    /* function to call on I/O completion */
        void                    *context;       /* netfs read context (pinned) */