summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_priv.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2021-10-07 13:27:56 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2021-10-16 21:28:43 -0400
commitbf23e619039d360d503b7282d030daf2277a5d47 (patch)
tree38e84bf6768eb1d613c595ea61cb2cdc0ede34de /drivers/scsi/scsi_priv.h
parent9131bff6a9f1d4c6ab2d4673974a9659d8d24dc7 (diff)
scsi: core: Use a structure member to track the SCSI command submitter
Conditional statements are faster than indirect calls. Use a structure member to track the SCSI command submitter such that later patches can call scsi_done(scmd) instead of scmd->scsi_done(scmd). The asymmetric behavior that scsi_send_eh_cmnd() sets the submission context to the SCSI error handler and that it does not restore the submission context to the SCSI core is retained. Link: https://lore.kernel.org/r/20211007202923.2174984-2-bvanassche@acm.org Cc: Hannes Reinecke <hare@suse.com> Cc: Ming Lei <ming.lei@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Reviewed-by: Benjamin Block <bblock@linux.ibm.com> Reviewed-by: Bean Huo <beanhuo@micron.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_priv.h')
-rw-r--r--drivers/scsi/scsi_priv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 2d9de5a165ae..f8ca22d495d9 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -84,6 +84,7 @@ void scsi_eh_ready_devs(struct Scsi_Host *shost,
int scsi_eh_get_sense(struct list_head *work_q,
struct list_head *done_q);
int scsi_noretry_cmd(struct scsi_cmnd *scmd);
+void scsi_eh_done(struct scsi_cmnd *scmd);
/* scsi_lib.c */
extern int scsi_maybe_unblock_host(struct scsi_device *sdev);