From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@mellanox.com>
Cc: Yishai Hadas <yishaih@mellanox.com>,
linux-rdma@vger.kernel.org, Sagi Grimberg <sagi@rimberg.me>
Subject: [PATCH rdma-next 7/9] IB/uverbs: Fix create WQ to use the given user handle
Date: Wed, 6 May 2020 10:40:47 +0300 [thread overview]
Message-ID: <20200506074049.8347-8-leon@kernel.org> (raw)
In-Reply-To: <20200506074049.8347-1-leon@kernel.org>
From: Yishai Hadas <yishaih@mellanox.com>
Fix create WQ to use the given user handle, in addition dropped some
duplicated code from this flow.
Fixes: fd3c7904db6e ("IB/core: Change idr objects to use the new schema")
Fixes: f213c0527210 ("IB/uverbs: Add WQ support")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/core/uverbs_cmd.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index d1971169d9b0..c72e53c8533e 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -2970,6 +2970,7 @@ static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)
wq_init_attr.event_handler = ib_uverbs_wq_event_handler;
wq_init_attr.create_flags = cmd.create_flags;
INIT_LIST_HEAD(&obj->uevent.event_list);
+ obj->uevent.uobject.user_handle = cmd.user_handle;
wq = pd->device->ops.create_wq(pd, &wq_init_attr, &attrs->driver_udata);
if (IS_ERR(wq)) {
@@ -2986,8 +2987,6 @@ static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)
atomic_set(&wq->usecnt, 0);
atomic_inc(&pd->usecnt);
atomic_inc(&cq->usecnt);
- wq->uobject = obj;
- obj->uevent.uobject.object = wq;
obj->uevent.event_file = attrs->ufile->default_async_file;
if (obj->uevent.event_file)
uverbs_uobject_get(&obj->uevent.event_file->uobj);
--
2.26.2
next prev parent reply other threads:[~2020-05-06 7:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 7:40 [PATCH rdma-next 0/9] Enable asynchronous event FD per object Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 1/9] RDMA/core: Allow the ioctl layer to abort a fully created uobject Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 2/9] IB/uverbs: Refactor related objects to use their own asynchronous event FD Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 3/9] IB/uverbs: Extend CQ to get its " Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 4/9] IB/uverbs: Cleanup wq/srq context usage from uverbs layer Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 5/9] RDMA/core: Consolidate ib_create_srq flows Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 6/9] IB/uverbs: Introduce create/destroy SRQ commands over ioctl Leon Romanovsky
2020-05-06 7:40 ` Leon Romanovsky [this message]
2020-05-06 7:40 ` [PATCH rdma-next 8/9] IB/uverbs: Introduce create/destroy WQ " Leon Romanovsky
2020-05-06 7:40 ` [PATCH rdma-next 9/9] IB/uverbs: Introduce create/destroy QP " Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200506074049.8347-8-leon@kernel.org \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=sagi@rimberg.me \
--cc=yishaih@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.