]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
block: Dedicated error code fixups
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 13 Jun 2017 15:07:33 +0000 (08:07 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 16 Jun 2017 15:47:15 +0000 (09:47 -0600)
This patch fixes two sparse warnings introduced by the "dedicated
error codes for the block layer V3" patch series. These changes
have not been tested.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio.c
block/t10-pi.c

index 7a5c8ed27f42e4ae50a5aae64a1c4a580513c114..0e36ca5407b5d073f90f2d25a1915df1ac474550 100644 (file)
@@ -1817,8 +1817,8 @@ again:
        }
 
        if (bio->bi_bdev && bio_flagged(bio, BIO_TRACE_COMPLETION)) {
-               trace_block_bio_complete(bdev_get_queue(bio->bi_bdev),
-                                        bio, bio->bi_status);
+               trace_block_bio_complete(bdev_get_queue(bio->bi_bdev), bio,
+                                        blk_status_to_errno(bio->bi_status));
                bio_clear_flag(bio, BIO_TRACE_COMPLETION);
        }
 
index 350b3cbcf9e53fd3b6770236b449a7dcdb2d18e7..3416dadf7b15b3c66cd71d04d9a954d7d0238657 100644 (file)
@@ -91,7 +91,7 @@ static blk_status_t t10_pi_verify(struct blk_integrity_iter *iter,
                                       "(rcvd %u)\n", iter->disk_name,
                                       (unsigned long long)
                                       iter->seed, be32_to_cpu(pi->ref_tag));
-                               return -EILSEQ;
+                               return BLK_STS_PROTECTION;
                        }
                        break;
                case 3: