diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 2e083c0d9215..70651f9fa653 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1191,24 +1191,19 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) | |||
1191 | ctx = sp->ctx; | 1191 | ctx = sp->ctx; |
1192 | if (ctx->type == SRB_LOGIN_CMD || | 1192 | if (ctx->type == SRB_LOGIN_CMD || |
1193 | ctx->type == SRB_LOGOUT_CMD) { | 1193 | ctx->type == SRB_LOGOUT_CMD) { |
1194 | del_timer_sync(&ctx->timer); | 1194 | ctx->u.iocb_cmd->free(sp); |
1195 | ctx->free(sp); | ||
1196 | } else { | 1195 | } else { |
1197 | struct srb_bsg *sp_bsg = | ||
1198 | (struct srb_bsg *)sp->ctx; | ||
1199 | struct fc_bsg_job *bsg_job = | 1196 | struct fc_bsg_job *bsg_job = |
1200 | sp_bsg->bsg_job; | 1197 | ctx->u.bsg_job; |
1201 | |||
1202 | if (bsg_job->request->msgcode | 1198 | if (bsg_job->request->msgcode |
1203 | == FC_BSG_HST_CT) | 1199 | == FC_BSG_HST_CT) |
1204 | kfree(sp->fcport); | 1200 | kfree(sp->fcport); |
1205 | bsg_job->req->errors = 0; | 1201 | bsg_job->req->errors = 0; |
1206 | bsg_job->reply->result = res; | 1202 | bsg_job->reply->result = res; |
1207 | bsg_job->job_done( | 1203 | bsg_job->job_done(bsg_job); |
1208 | sp_bsg->bsg_job); | ||
1209 | kfree(sp->ctx); | 1204 | kfree(sp->ctx); |
1210 | mempool_free(sp, | 1205 | mempool_free(sp, |
1211 | ha->srb_mempool); | 1206 | ha->srb_mempool); |
1212 | } | 1207 | } |
1213 | } | 1208 | } |
1214 | } | 1209 | } |