From ec5e922002296303b7f5cc98ae527dd4f509f1d1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 3 May 2015 08:56:28 +0200 Subject: [PATCH] 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 --- scst/src/scst_targ.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index f5b7eb101..70c3f69c8 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -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;