Decrease time cpu_cmd_counter is held taken for suspending case for debug

mode to minimize race window described in
http://sourceforge.net/p/scst/mailman/message/34074831/



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6193 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2015-05-01 23:49:20 +00:00
parent 906f4dfefb
commit b59ce01ead

View File

@@ -4461,8 +4461,8 @@ static int scst_translate_lun(struct scst_cmd *cmd)
scst_put(cmd->cpu_cmd_counter);
}
} else {
TRACE_MGMT_DBG("%s", "FLAG SUSPENDED set, skipping");
scst_put(cmd->cpu_cmd_counter);
TRACE_MGMT_DBG("%s", "FLAG SUSPENDED set, skipping");
res = 1;
}
@@ -5044,8 +5044,8 @@ static int scst_get_mgmt(struct scst_mgmt_cmd *mcmd)
if (unlikely(test_bit(SCST_FLAG_SUSPENDED, &scst_flags) &&
!test_bit(SCST_FLAG_SUSPENDING, &scst_flags))) {
TRACE_MGMT_DBG("%s", "FLAG SUSPENDED set, skipping");
scst_put(mcmd->cpu_cmd_counter);
TRACE_MGMT_DBG("%s", "FLAG SUSPENDED set, skipping");
res = 1;
goto out;
}