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.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-06-17 00:01:24 +00:00
parent a6f9f870b3
commit b6c00bfba1

View File

@@ -5617,6 +5617,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;