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>
This commit is contained in:

committed by
Jason Gunthorpe

parent
2d65f49ff9
commit
e1f540c3ed
@@ -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;
|
||||
|
Reference in New Issue
Block a user