[Devel] [PATCH RHEL7 COMMIT] fuse: Kill fuse_req::intr_unique
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Oct 4 12:04:52 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.2
------>
commit 2c9dcf99aff86f4e787695b64ee431d624b0511e
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Thu Oct 4 11:57:52 2018 +0300
fuse: Kill fuse_req::intr_unique
(this is going to ms)
This field is not needed after the previous patch,
since we can easily convert request ID to interrupt
request ID and vice versa.
https://pmc.acronis.com/browse/VSTOR-14760
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
fs/fuse/dev.c | 11 ++++++-----
fs/fuse/fuse_i.h | 3 ---
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index c343c799f3ae..22e0cf689b75 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1132,12 +1132,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);
@@ -1909,8 +1908,10 @@ static struct fuse_req *request_find(struct fuse_pqueue *fpq, u64 unique)
{
struct fuse_req *req;
+ unique &= ~FUSE_INT_REQ_BIT;
+
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;
@@ -1988,8 +1989,8 @@ static ssize_t fuse_dev_do_write(struct fuse_dev *fud,
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) {
spin_unlock(&fpq->lock);
err = -EINVAL;
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 9069cddc42a2..14f7a2af0a90 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -332,9 +332,6 @@ struct fuse_req {
/** refcount */
atomic_t count;
- /** Unique ID for the interrupt request */
- u64 intr_unique;
-
/* Request flags, updated with test/set/clear_bit() */
unsigned long flags;
More information about the Devel
mailing list