scsi: core: scsi_error: Do not queue pointless abort workqueue functions
authorHannes Reinecke <hare@suse.de>
Tue, 6 Dec 2022 13:13:45 +0000 (14:13 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 14 Dec 2022 02:58:32 +0000 (02:58 +0000)
commitd0b9025540ef57cc4464ab2fc64ed8ddc49b5658
tree70c7e73a23e586a44656f330c82eb9e17dc2e113
parent67ff3d0a49f3d445c3922e30a54e03c161da561e
scsi: core: scsi_error: Do not queue pointless abort workqueue functions

If a host template doesn't implement the .eh_abort_handler() there is no
point in queueing the abort workqueue function; all it does is invoking
SCSI EH anyway.  So return 'FAILED' from scsi_abort_command() if the
.eh_abort_handler() is not implemented and save us from having to wait for
the abort workqueue function to complete.

Cc: Niklas Cassel <niklas.cassel@wdc.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
[niklas: moved the check to the top of scsi_abort_command()]
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20221206131346.2045375-1-niklas.cassel@wdc.com
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c