mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst: Fix __scst_init_cmd()
Fixes: 5b0f9ef0b9 ("scst: Increase tgt_dev_cmd_count by one") / r8465.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8472 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -5142,7 +5142,7 @@ static int __scst_init_cmd(struct scst_cmd *cmd)
|
||||
|
||||
scst_set_cmd_state(cmd, SCST_CMD_STATE_PARSE);
|
||||
|
||||
cnt = atomic_inc_return(&tgt_dev->tgt_dev_cmd_count);
|
||||
cnt = atomic_inc_return(&tgt_dev->tgt_dev_cmd_count) - 1;
|
||||
if (unlikely(cnt > dev->max_tgt_dev_commands)) {
|
||||
TRACE(TRACE_FLOW_CONTROL,
|
||||
"Too many pending commands (%d) in "
|
||||
|
||||
Reference in New Issue
Block a user