scst_targ: Add more debug code in scst_unblock_aborted_cmds()

Use lockdep to verify that the caller holds scst_mutex if the
scst_mutex_held argument has not been set.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
Bart Van Assche
2015-05-04 07:12:54 +02:00
parent 8cf0fcbe86
commit ec5e922002
+2
View File
@@ -5597,6 +5597,8 @@ void scst_unblock_aborted_cmds(const struct scst_tgt *tgt,
if (!scst_mutex_held)
mutex_lock(&scst_mutex);
else
lockdep_assert_held(&scst_mutex);
list_for_each_entry(dev, &scst_dev_list, dev_list_entry) {
struct scst_cmd *cmd, *tcmd;