Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
scsi: libfc: don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdo…
Browse files Browse the repository at this point in the history
…ne()

Don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone() as
fc_bsg_jobdone() calls blk_complete_requeust() which raises a soft-IRQ
that ends up in fc_bsg_sofirq_done() and fc_bsg_softirq_done() sets the
FC_RQST_STATE_DONE flag.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Johannes Thumshirn authored and martinkpetersen committed Nov 18, 2016
1 parent 1d69b12 commit 7ac6500
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,6 @@ static void fc_lport_bsg_resp(struct fc_seq *sp, struct fc_frame *fp,
bsg_reply->result = (PTR_ERR(fp) == -FC_EX_CLOSED) ?
-ECONNABORTED : -ETIMEDOUT;
job->reply_len = sizeof(uint32_t);
job->state_flags |= FC_RQST_STATE_DONE;
fc_bsg_jobdone(job, bsg_reply->result,
bsg_reply->reply_payload_rcv_len);
kfree(info);
Expand Down Expand Up @@ -1948,7 +1947,6 @@ static void fc_lport_bsg_resp(struct fc_seq *sp, struct fc_frame *fp,
bsg_reply->reply_payload_rcv_len =
job->reply_payload.payload_len;
bsg_reply->result = 0;
job->state_flags |= FC_RQST_STATE_DONE;
fc_bsg_jobdone(job, bsg_reply->result,
bsg_reply->reply_payload_rcv_len);
kfree(info);
Expand Down

0 comments on commit 7ac6500

Please sign in to comment.