IB/srp: Change target_mutex to a spinlock
The SRP driver never sleeps while holding target_mutex, and it's just used to protect some simple list operations, so hold times will be short. So just convert it to a spinlock, which is smaller and faster. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
committed by
Roland Dreier
parent
549c5fc2c8
commit
b3589fd490
@ -99,7 +99,7 @@ struct srp_host {
|
||||
u8 port;
|
||||
struct class_device class_dev;
|
||||
struct list_head target_list;
|
||||
struct mutex target_mutex;
|
||||
spinlock_t target_lock;
|
||||
struct completion released;
|
||||
struct list_head list;
|
||||
};
|
||||
|
Reference in New Issue
Block a user