aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2018-08-28 15:08:45 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-09-06 13:45:38 -0600
commite1f540c3ed0e9634d0f8c4600f3c85df8aff4ae2 (patch)
tree4d438a38528fd667dd63d48c12c580316cb8946a /include
parentRDMA/core: Use simpler spin lock irq API from blocking context (diff)
downloadlinux-dev-e1f540c3ed0e9634d0f8c4600f3c85df8aff4ae2.tar.xz
linux-dev-e1f540c3ed0e9634d0f8c4600f3c85df8aff4ae2.zip
RDMA/core: Define client_data_lock as rwlock instead of spinlock
Even though device registration/unregistration and client registration/unregistration is not a performance path, define the client_data_lock as rwlock for code clarity. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include')
-rw-r--r--include/rdma/ib_verbs.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index ddc7c317e136..995f176d4782 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -2256,10 +2256,11 @@ struct ib_device {
struct list_head event_handler_list;
spinlock_t event_handler_lock;
- spinlock_t client_data_lock;
+ rwlock_t client_data_lock;
struct list_head core_list;
/* Access to the client_data_list is protected by the client_data_lock
- * spinlock and the lists_rwsem read-write semaphore */
+ * rwlock and the lists_rwsem read-write semaphore
+ */
struct list_head client_data_list;
struct ib_cache cache;