From b4b84edc5d3982749c342669b6fbef6ef239730e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 7 Oct 2021 13:28:39 -0700 Subject: 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.org Reviewed-by: Lee Duncan Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen --- drivers/scsi/libiscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 54dd9f581290..284b939fb1ea 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -468,7 +468,7 @@ static void iscsi_free_task(struct iscsi_task *task) * it will decide how to return sc to scsi-ml. */ if (oldstate != ISCSI_TASK_REQUEUE_SCSIQ) - sc->scsi_done(sc); + scsi_done(sc); } } @@ -1807,7 +1807,7 @@ fault: ISCSI_DBG_SESSION(session, "iscsi: cmd 0x%x is not queued (%d)\n", sc->cmnd[0], reason); scsi_set_resid(sc, scsi_bufflen(sc)); - sc->scsi_done(sc); + scsi_done(sc); return 0; } EXPORT_SYMBOL_GPL(iscsi_queuecommand); -- cgit v1.2.3