scsi: scsi_debug: Change shost list lock to a mutex
authorJohn Garry <john.g.garry@oracle.com>
Mon, 27 Mar 2023 07:43:02 +0000 (07:43 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 3 Apr 2023 02:09:21 +0000 (22:09 -0400)
commit0aaa3fad4fd931ba3accac3a1fcc7334ca780591
tree6ad4b58ebf2f0a64a9eda5aaa66ab3c7350fbceb
parent00f9d622e8b237d8403569ee51f7bfb9bf89a2d5
scsi: scsi_debug: Change shost list lock to a mutex

The shost list lock, sdebug_host_list_lock, is a spinlock. We would only
lock in non-atomic context in this driver, so use a mutex instead, which is
friendlier if we need to schedule when iterating.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20230327074310.1862889-4-john.g.garry@oracle.com
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c