diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-05-05 13:36:03 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-05-05 13:36:03 +0800 |
commit | e91b1cc90283c1b9b75670b027a18afbd20fe070 (patch) | |
tree | 81c395406a3774775a183d544aee9c5ced1c31d6 /fs/fuse/fuse_i.h | |
parent | d83731cf53fd3af7173cab5e3f573d06ebc852be (diff) | |
parent | 0b3df30dcadcddc56aed56c3c2d2de2ca963e81d (diff) |
Merge branch 'linux-linaro-lsk-v4.1' into linux-linaro-lsk-v4.1-rtlsk-v4.1-16.06-rtlsk-v4.1-16.05-rt
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 7354dc142a50..85f9d8273455 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -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 @@ -253,6 +254,7 @@ enum fuse_req_state { /** The request IO state (for asynchronous processing) */ struct fuse_io_priv { + struct kref refcnt; int async; spinlock_t lock; unsigned reqs; @@ -266,6 +268,13 @@ struct fuse_io_priv { struct completion *done; }; +#define FUSE_IO_PRIV_SYNC(f) \ +{ \ + .refcnt = { ATOMIC_INIT(1) }, \ + .async = 0, \ + .file = f, \ +} + /** * A request to the client */ |