summaryrefslogtreecommitdiff
path: root/fs/fuse
diff options
context:
space:
mode:
authorKirill Tkhai <ktkhai@virtuozzo.com>2018-09-11 13:12:05 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2018-09-28 16:43:23 +0200
commit3a5358d1a1b70bb3360578f09894d6856629ecdf (patch)
treea6ecdd3d2286bb09a30651c9f9b870f625caed8b /fs/fuse
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>
Diffstat (limited to 'fs/fuse')
-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)
int err;
list_del_init(&req->intr_entry);
- req->intr_unique = (req->in.h.unique | FUSE_INT_REQ_BIT);
memset(&ih, 0, sizeof(ih));
memset(&arg, 0, sizeof(arg));
ih.len = reqsize;
ih.opcode = FUSE_INTERRUPT;
- ih.unique = req->intr_unique;
+ ih.unique = (req->in.h.unique | FUSE_INT_REQ_BIT);
arg.unique = req->in.h.unique;
spin_unlock(&fiq->waitq.lock);
@@ -1808,7 +1807,7 @@ static struct fuse_req *request_find(struct fuse_pqueue *fpq, u64 unique)
struct fuse_req *req;
list_for_each_entry(req, &fpq->processing, list) {
- if (req->in.h.unique == unique || req->intr_unique == unique)
+ if (req->in.h.unique == unique)
return req;
}
return NULL;
@@ -1882,12 +1881,12 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
if (!fpq->connected)
goto err_unlock_pq;
- req = request_find(fpq, oh.unique);
+ req = request_find(fpq, oh.unique & ~FUSE_INT_REQ_BIT);
if (!req)
goto err_unlock_pq;
- /* Is it an interrupt reply? */
- if (req->intr_unique == oh.unique) {
+ /* Is it an interrupt reply ID? */
+ if (oh.unique & FUSE_INT_REQ_BIT) {
__fuse_get_request(req);
spin_unlock(&fpq->lock);
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 {
/** refcount */
refcount_t count;
- /** Unique ID for the interrupt request */
- u64 intr_unique;
-
/* Request flags, updated with test/set/clear_bit() */
unsigned long flags;