diff options
author | Leon Romanovsky | 2019-02-18 21:25:46 +0100 |
---|---|---|
committer | Jason Gunthorpe | 2019-02-19 05:04:36 +0100 |
commit | 48118527186fb255461ebf3685ab0f1c2680bd9c (patch) | |
tree | 6793d308f9dc6a61c7e60abed914420cecbfc007 /drivers/infiniband/core | |
parent | RDMA/nldev: Add resource tracker doit callback (diff) | |
download | kernel-qcow2-linux-48118527186fb255461ebf3685ab0f1c2680bd9c.tar.gz kernel-qcow2-linux-48118527186fb255461ebf3685ab0f1c2680bd9c.tar.xz kernel-qcow2-linux-48118527186fb255461ebf3685ab0f1c2680bd9c.zip |
RDMA/restrack: Reduce scope of synchronization lock while updating DB
XArray uses internal lock for updates to XArray. This means that our
external RW lock is needed to ensure that entry is not deleted while we
are performing iteration over list.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/restrack.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c index ac97167da81c..076ef6475df8 100644 --- a/drivers/infiniband/core/restrack.c +++ b/drivers/infiniband/core/restrack.c @@ -210,13 +210,11 @@ static void rdma_restrack_add(struct rdma_restrack_entry *res) kref_init(&res->kref); init_completion(&res->comp); - down_write(&dev->res.rwsem); ret = rt_xa_alloc_cyclic(&dev->res.xa[res->type], &res->id, res, &dev->res.next_id[res->type]); if (!ret) res->valid = true; - up_write(&dev->res.rwsem); } /** |