Merge of the trunk's r2422:

Fix possible crash on ABORT TASK SET TM command fixed



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.0.0.x@2423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2010-10-18 18:44:17 +00:00
parent 671f955c72
commit 5ace9d78bc

View File

@@ -4935,8 +4935,12 @@ static int scst_abort_task_set(struct scst_mgmt_cmd *mcmd)
__scst_abort_task_set(mcmd, tgt_dev);
if (atomic_dec_and_test(&mcmd->origin_pr_cmd->pr_abort_counter->pr_aborting_cnt))
complete_all(&mcmd->origin_pr_cmd->pr_abort_counter->pr_aborting_cmpl);
if (mcmd->fn == SCST_PR_ABORT_ALL) {
struct scst_pr_abort_all_pending_mgmt_cmds_counter *pr_cnt =
mcmd->origin_pr_cmd->pr_abort_counter;
if (atomic_dec_and_test(&pr_cnt->pr_aborting_cnt))
complete_all(&pr_cnt->pr_aborting_cmpl);
}
tm_dbg_task_mgmt(mcmd->mcmd_tgt_dev->dev, "ABORT TASK SET/PR ABORT", 0);