summaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2019-02-18 21:25:46 +0100
committerJason Gunthorpe <jgg@mellanox.com>2019-02-19 05:04:36 +0100
commit48118527186fb255461ebf3685ab0f1c2680bd9c (patch)
tree6793d308f9dc6a61c7e60abed914420cecbfc007 /include/rdma
parentRDMA/nldev: Add resource tracker doit callback (diff)
downloadlinux-48118527186fb255461ebf3685ab0f1c2680bd9c.tar.xz
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 'include/rdma')
-rw-r--r--include/rdma/restrack.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/rdma/restrack.h b/include/rdma/restrack.h
index 44ce32cc0b51..53e1a7fb7355 100644
--- a/include/rdma/restrack.h
+++ b/include/rdma/restrack.h
@@ -58,7 +58,8 @@ struct rdma_restrack_entry;
*/
struct rdma_restrack_root {
/*
- * @rwsem: Read/write lock to protect lists
+ * @rwsem: Read/write lock to protect erase of entry.
+ * Lists and insertions are protected by XArray internal lock.
*/
struct rw_semaphore rwsem;
/**