aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-09-11 06:12:05 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2018-09-28 10:43:23 -0400
commit3a5358d1a1b70bb3360578f09894d6856629ecdf (patch)
treea6ecdd3d2286bb09a30651c9f9b870f625caed8b
parentc59fd85e4fd07fdf0ab523a5e9734f5338d6aa19 (diff)
fuse: kill req->intr_unique
This field is not needed after the previous patch, since we can easily convert request ID to interrupt request ID and vice versa. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
-rw-r--r--fs/fuse/dev.c11
-rw-r--r--fs/fuse/fuse_i.h3
2 files changed, 5 insertions, 9 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 38bb46ab2d7b..eee43057b99b 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1095,12 +1095,11 @@ __releases(fiq->waitq.lock)
1095 int err; 1095 int err;
1096 1096
1097 list_del_init(&req->intr_entry); 1097 list_del_init(&req->intr_entry);
1098 req->intr_unique = (req->in.h.unique | FUSE_INT_REQ_BIT);
1099 memset(&ih, 0, sizeof(ih)); 1098 memset(&ih, 0, sizeof(ih));
1100 memset(&arg, 0, sizeof(arg)); 1099 memset(&arg, 0, sizeof(arg));
1101 ih.len = reqsize; 1100 ih.len = reqsize;
1102 ih.opcode = FUSE_INTERRUPT; 1101 ih.opcode = FUSE_INTERRUPT;
1103 ih.unique = req->intr_unique; 1102 ih.unique = (req->in.h.unique | FUSE_INT_REQ_BIT);
1104 arg.unique = req->in.h.unique; 1103 arg.unique = req->in.h.unique;
1105 1104
1106 spin_unlock(&fiq->waitq.lock); 1105 spin_unlock(&fiq->waitq.lock);
@@ -1808,7 +1807,7 @@ static struct fuse_req *request_find(struct fuse_pqueue *fpq, u64 unique)
1808 struct fuse_req *req; 1807 struct fuse_req *req;
1809 1808
1810 list_for_each_entry(req, &fpq->processing, list) { 1809 list_for_each_entry(req, &fpq->processing, list) {
1811 if (req->in.h.unique == unique || req->intr_unique == unique) 1810 if (req->in.h.unique == unique)
1812 return req; 1811 return req;
1813 } 1812 }
1814 return NULL; 1813 return NULL;
@@ -1882,12 +1881,12 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
1882 if (!fpq->connected) 1881 if (!fpq->connected)
1883 goto err_unlock_pq; 1882 goto err_unlock_pq;
1884 1883
1885 req = request_find(fpq, oh.unique); 1884 req = request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
1886 if (!req) 1885 if (!req)
1887 goto err_unlock_pq; 1886 goto err_unlock_pq;
1888 1887
1889 /* Is it an interrupt reply? */ 1888 /* Is it an interrupt reply ID? */
1890 if (req->intr_unique == oh.unique) { 1889 if (oh.unique & FUSE_INT_REQ_BIT) {
1891 __fuse_get_request(req); 1890 __fuse_get_request(req);
1892 spin_unlock(&fpq->lock); 1891 spin_unlock(&fpq->lock);
1893 1892
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 6e6eab8127a4..1d7b5b7a051d 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -311,9 +311,6 @@ struct fuse_req {
311 /** refcount */ 311 /** refcount */
312 refcount_t count; 312 refcount_t count;
313 313
314 /** Unique ID for the interrupt request */
315 u64 intr_unique;
316
317 /* Request flags, updated with test/set/clear_bit() */ 314 /* Request flags, updated with test/set/clear_bit() */
318 unsigned long flags; 315 unsigned long flags;
319 316