aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2018-02-12 18:38:05 +0000
committerMartin K. Petersen <[email protected]>2018-02-14 02:49:16 +0000
commit923f46f9e9b0a2352c93500cda989996ff875cbd (patch)
tree474e51705317a217599a67d17c9bec7ad724fcc6 /drivers/scsi/scsi_error.c
parentscsi: pmcraid: Use sgl_alloc_order() and sgl_free_order() (diff)
downloadkernel-923f46f9e9b0a2352c93500cda989996ff875cbd.tar.gz
kernel-923f46f9e9b0a2352c93500cda989996ff875cbd.zip
scsi: core: scmd_eh_abort_handler(): Add a comment
After the patch that introduced this function was posted on the linux-scsi mailing list an explanation was posted why this patch is correct. Since that explanation contains important information, add a summary of it above the code that explanation applies to. See also http://www.spinics.net/lists/linux-scsi/msg106326.html. References: e494f6a72839 ("[SCSI] improved eh timeout handler") Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Johannes Thumshirn <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index d042915ce895..96f988a7efda 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -117,6 +117,12 @@ static int scsi_host_eh_past_deadline(struct Scsi_Host *shost)
/**
* scmd_eh_abort_handler - Handle command aborts
* @work: command to be aborted.
+ *
+ * Note: this function must be called only for a command that has timed out.
+ * Because the block layer marks a request as complete before it calls
+ * scsi_times_out(), a .scsi_done() call from the LLD for a command that has
+ * timed out do not have any effect. Hence it is safe to call
+ * scsi_finish_command() from this function.
*/
void
scmd_eh_abort_handler(struct work_struct *work)