scsi_transport_fc: complete requests from ->timeout
authorChristoph Hellwig <hch@lst.de>
Tue, 29 May 2018 13:52:34 +0000 (15:52 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 29 May 2018 14:59:21 +0000 (08:59 -0600)
By completing the request entirely in the driver we can remove the
BLK_EH_HANDLED return value and thus the split responsibility between the
driver and the block layer that has been causing trouble.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_transport_fc.c

index 90075a0ddcfe33b6209373531d6dc8977c273d9e..7a9a65588a1bcfb7de86cb45e500280a74158e13 100644 (file)
@@ -3591,10 +3591,9 @@ fc_bsg_job_timeout(struct request *req)
        }
 
        /* the blk_end_sync_io() doesn't check the error */
-       if (!inflight)
-               return BLK_EH_DONE;
-       else
-               return BLK_EH_HANDLED;
+       if (inflight)
+               blk_mq_complete_request(req);
+       return BLK_EH_DONE;
 }
 
 /**