nvmet: remove a superfluous variable
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 3 Jun 2021 00:37:58 +0000 (17:37 -0700)
committerChristoph Hellwig <hch@lst.de>
Thu, 3 Jun 2021 07:29:26 +0000 (10:29 +0300)
Remove the superfluous variable "bdev" that is only used once in the
nvmet_bdev_alloc_bip() and use req->ns->bdev that is used everywhere in
the code to access the nvmet request's bdev.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/io-cmd-bdev.c

index 429263c..f673679 100644 (file)
@@ -174,11 +174,10 @@ static int nvmet_bdev_alloc_bip(struct nvmet_req *req, struct bio *bio,
 {
        struct blk_integrity *bi;
        struct bio_integrity_payload *bip;
-       struct block_device *bdev = req->ns->bdev;
        int rc;
        size_t resid, len;
 
-       bi = bdev_get_integrity(bdev);
+       bi = bdev_get_integrity(req->ns->bdev);
        if (unlikely(!bi)) {
                pr_err("Unable to locate bio_integrity\n");
                return -ENODEV;