mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 12:30:23 +09:00
scsi: ib_srp: Call scsi_done() directly
[ Upstream commit5f9ae9eecb] Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-6-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Stable-dep-of:e193b7955d("RDMA/srp: Do not call scsi_done() from srp_abort()") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d2746cdfd5
commit
7d4999589e
@@ -1266,7 +1266,7 @@ static void srp_finish_req(struct srp_rdma_ch *ch, struct srp_request *req,
|
||||
if (scmnd) {
|
||||
srp_free_req(ch, req, scmnd, 0);
|
||||
scmnd->result = result;
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1984,7 +1984,7 @@ static void srp_process_rsp(struct srp_rdma_ch *ch, struct srp_rsp *rsp)
|
||||
srp_free_req(ch, req, scmnd,
|
||||
be32_to_cpu(rsp->req_lim_delta));
|
||||
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2236,7 +2236,7 @@ err_iu:
|
||||
|
||||
err:
|
||||
if (scmnd->result) {
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
ret = 0;
|
||||
} else {
|
||||
ret = SCSI_MLQUEUE_HOST_BUSY;
|
||||
@@ -2806,7 +2806,7 @@ static int srp_abort(struct scsi_cmnd *scmnd)
|
||||
if (ret == SUCCESS) {
|
||||
srp_free_req(ch, req, scmnd, 0);
|
||||
scmnd->result = DID_ABORT << 16;
|
||||
scmnd->scsi_done(scmnd);
|
||||
scsi_done(scmnd);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user