From 763349df7ce368c72be2cd37275ee59665c38706 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 22 Aug 2016 16:17:25 +0000 Subject: [PATCH] scst: Insert a blank line after declarations where it was missing git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6974 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_copy_mgr.c | 1 + scst/src/scst_targ.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index f367da21f..825cd8698 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2530,6 +2530,7 @@ static unsigned int scst_cm_get_lun(const struct scst_device *dev) for (i = 0; i < SESS_TGT_DEV_LIST_HASH_SIZE; i++) { struct list_head *head = &scst_cm_sess->sess_tgt_dev_list[i]; struct scst_tgt_dev *tgt_dev; + list_for_each_entry(tgt_dev, head, sess_tgt_dev_list_entry) { if (tgt_dev->dev == dev) { res = tgt_dev->lun; diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index cb1d06939..d3e46430c 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -1919,6 +1919,7 @@ static void scst_process_redirect_cmd(struct scst_cmd *cmd, case SCST_CONTEXT_THREAD: { struct list_head *active_cmd_list; + if (cmd->cmd_thr != NULL) { TRACE_DBG("Using assigned thread %p for cmd %p", cmd->cmd_thr, cmd); @@ -5500,6 +5501,7 @@ int scst_cmd_thread(void *arg) while (!kthread_should_stop()) { if (!test_cmd_threads(thr)) { DEFINE_WAIT(wait); + do { prepare_to_wait_exclusive_head( &p_cmd_threads->cmd_list_waitQ,