diff options
| -rw-r--r-- | fs/fuse/dev.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 071feb8cb265..38bb46ab2d7b 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
| @@ -25,6 +25,10 @@ | |||
| 25 | MODULE_ALIAS_MISCDEV(FUSE_MINOR); | 25 | MODULE_ALIAS_MISCDEV(FUSE_MINOR); |
| 26 | MODULE_ALIAS("devname:fuse"); | 26 | MODULE_ALIAS("devname:fuse"); |
| 27 | 27 | ||
| 28 | /* Ordinary requests have even IDs, while interrupts IDs are odd */ | ||
| 29 | #define FUSE_INT_REQ_BIT (1ULL << 0) | ||
| 30 | #define FUSE_REQ_ID_STEP (1ULL << 1) | ||
| 31 | |||
| 28 | static struct kmem_cache *fuse_req_cachep; | 32 | static struct kmem_cache *fuse_req_cachep; |
| 29 | 33 | ||
| 30 | static struct fuse_dev *fuse_get_dev(struct file *file) | 34 | static struct fuse_dev *fuse_get_dev(struct file *file) |
| @@ -319,7 +323,8 @@ static unsigned len_args(unsigned numargs, struct fuse_arg *args) | |||
| 319 | 323 | ||
| 320 | static u64 fuse_get_unique(struct fuse_iqueue *fiq) | 324 | static u64 fuse_get_unique(struct fuse_iqueue *fiq) |
| 321 | { | 325 | { |
| 322 | return ++fiq->reqctr; | 326 | fiq->reqctr += FUSE_REQ_ID_STEP; |
| 327 | return fiq->reqctr; | ||
| 323 | } | 328 | } |
| 324 | 329 | ||
| 325 | static void queue_request(struct fuse_iqueue *fiq, struct fuse_req *req) | 330 | static void queue_request(struct fuse_iqueue *fiq, struct fuse_req *req) |
| @@ -1090,7 +1095,7 @@ __releases(fiq->waitq.lock) | |||
| 1090 | int err; | 1095 | int err; |
| 1091 | 1096 | ||
| 1092 | list_del_init(&req->intr_entry); | 1097 | list_del_init(&req->intr_entry); |
| 1093 | req->intr_unique = fuse_get_unique(fiq); | 1098 | req->intr_unique = (req->in.h.unique | FUSE_INT_REQ_BIT); |
| 1094 | memset(&ih, 0, sizeof(ih)); | 1099 | memset(&ih, 0, sizeof(ih)); |
| 1095 | memset(&arg, 0, sizeof(arg)); | 1100 | memset(&arg, 0, sizeof(arg)); |
| 1096 | ih.len = reqsize; | 1101 | ih.len = reqsize; |
