mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-20 12:11:26 +00:00
Fix hang under load + avoid unneeded logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -894,8 +894,10 @@ static int scst_susp_wait(unsigned long timeout)
|
||||
} else if ((res < 0) && (timeout != SCST_SUSPEND_TIMEOUT_UNLIMITED))
|
||||
goto out;
|
||||
|
||||
scst_trace_cmds(scst_to_syslog, &hp);
|
||||
scst_trace_mcmds(scst_to_syslog, &hp);
|
||||
if (res == 0) {
|
||||
scst_trace_cmds(scst_to_syslog, &hp);
|
||||
scst_trace_mcmds(scst_to_syslog, &hp);
|
||||
}
|
||||
|
||||
if (timeout != SCST_SUSPEND_TIMEOUT_UNLIMITED) {
|
||||
res = wait_event_interruptible_timeout(scst_dev_cmd_waitQ,
|
||||
@@ -904,8 +906,10 @@ static int scst_susp_wait(unsigned long timeout)
|
||||
res = -EBUSY;
|
||||
else if (res > 0)
|
||||
res = 0;
|
||||
} else
|
||||
} else {
|
||||
wait_event(scst_dev_cmd_waitQ, scst_get_cmd_counter() == 0);
|
||||
res = 0;
|
||||
}
|
||||
|
||||
out:
|
||||
TRACE_MGMT_DBG("wait_event() returned %d", res);
|
||||
|
||||
Reference in New Issue
Block a user