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:
Matthew Wilcox
2006-06-17 20:37:30 -07:00
committed by Roland Dreier
parent 549c5fc2c8
commit b3589fd490
2 changed files with 8 additions and 8 deletions

View File

@ -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;
};