scsi/osd: don't save block errors into req_results
authorChristoph Hellwig <hch@lst.de>
Sat, 3 Jun 2017 07:37:55 +0000 (09:37 +0200)
committerJens Axboe <axboe@fb.com>
Fri, 9 Jun 2017 15:27:32 +0000 (09:27 -0600)
We will only have sense data if the command executed and got a SCSI
result, so this is pointless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/scsi/osd/osd_initiator.c

index 8a1b948164191c322aa01e97b54a930efadd301a..14785177ce7bda85024bd7e8c777cab38fea3383 100644 (file)
@@ -477,7 +477,7 @@ static void _set_error_resid(struct osd_request *or, struct request *req,
                             int error)
 {
        or->async_error = error;
-       or->req_errors = scsi_req(req)->result ? : error;
+       or->req_errors = scsi_req(req)->result;
        or->sense_len = scsi_req(req)->sense_len;
        if (or->sense_len)
                memcpy(or->sense, scsi_req(req)->sense, or->sense_len);