Fix command result state propagation
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 25 Jun 2014 22:50:33 +0000 (16:50 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 2 Apr 2015 18:12:27 +0000 (12:12 -0600)
commit8eda762cdcd3ebb46062d42be1309ad17e09c730
tree0b5e741d09008b6e6f0c9786a5b0625468c57bfd
parent4115d659efd7fdcd9c244df20715ed35a7c7a5e6
Fix command result state propagation

We're seeing a case where the contents of scmd->result isn't being reset after
a SCSI command encounters an error, is resubmitted, times out and then gets
handled.  The error handler acts on the stale result of the previous error
instead of the timeout.  Fix this by properly zeroing the scmd->status before
the command is resubmitted.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_error.c
drivers/scsi/scsi_lib.c