UPSTREAM: thermal: rockchip: improve the warning log
[firefly-linux-kernel-4.4.55.git] / fs / fuse / fuse_i.h
index 405113101db8d868fcb40c34199978be576d0961..644687ae04bd931285fa3ca894924c1506be1a21 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/rbtree.h>
 #include <linux/poll.h>
 #include <linux/workqueue.h>
+#include <linux/kref.h>
 
 /** Max number of pages that can be used in a single read request */
 #define FUSE_MAX_PAGES_PER_REQ 32
@@ -243,6 +244,7 @@ struct fuse_args {
 
 /** The request IO state (for asynchronous processing) */
 struct fuse_io_priv {
+       struct kref refcnt;
        int async;
        spinlock_t lock;
        unsigned reqs;
@@ -256,6 +258,13 @@ struct fuse_io_priv {
        struct completion *done;
 };
 
+#define FUSE_IO_PRIV_SYNC(f) \
+{                                      \
+       .refcnt = { ATOMIC_INIT(1) },   \
+       .async = 0,                     \
+       .file = f,                      \
+}
+
 /**
  * Request flags
  *
@@ -363,6 +372,9 @@ struct fuse_req {
        /** Inode used in the request or NULL */
        struct inode *inode;
 
+       /** Path used for completing d_canonical_path */
+       struct path *canonical_path;
+
        /** AIO control block */
        struct fuse_io_priv *io;