Commit b4b84edc authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: libiscsi: Call scsi_done() directly

Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-45-bvanassche@acm.orgReviewed-by: default avatarLee Duncan <lduncanb@suse.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent e0f63b21
...@@ -468,7 +468,7 @@ static void iscsi_free_task(struct iscsi_task *task) ...@@ -468,7 +468,7 @@ static void iscsi_free_task(struct iscsi_task *task)
* it will decide how to return sc to scsi-ml. * it will decide how to return sc to scsi-ml.
*/ */
if (oldstate != ISCSI_TASK_REQUEUE_SCSIQ) if (oldstate != ISCSI_TASK_REQUEUE_SCSIQ)
sc->scsi_done(sc); scsi_done(sc);
} }
} }
...@@ -1807,7 +1807,7 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc) ...@@ -1807,7 +1807,7 @@ int iscsi_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *sc)
ISCSI_DBG_SESSION(session, "iscsi: cmd 0x%x is not queued (%d)\n", ISCSI_DBG_SESSION(session, "iscsi: cmd 0x%x is not queued (%d)\n",
sc->cmnd[0], reason); sc->cmnd[0], reason);
scsi_set_resid(sc, scsi_bufflen(sc)); scsi_set_resid(sc, scsi_bufflen(sc));
sc->scsi_done(sc); scsi_done(sc);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(iscsi_queuecommand); EXPORT_SYMBOL_GPL(iscsi_queuecommand);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment