From: Daniel Wagner Date: Mon, 7 Jun 2021 08:46:51 +0000 (+0200) Subject: nvme: remove superfluous bio_set_dev in nvme_requeue_work X-Git-Tag: microblaze-v5.15~128^2^2~34 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=2411424143bdfad3027e82fe6a66c5aadce271ee;p=linux-2.6-microblaze.git nvme: remove superfluous bio_set_dev in nvme_requeue_work Commit ce86dad222e9 ("nvme-multipath: reset bdev to ns head when failover") moved the reset code where the bio is added to the requeue_list for the failover path. But it left the original bio_set_dev in nvme_requeue_work. There is a second path to nvme_requee_work. It is via nvme_ns_head_submit_bio. Though we don't have to set bio->bi_bdev for this path either, as it points to the correct bdev already. Let's remove the bio_set_dev. It's updating the bio->bi_bdev with the same pointer and thus it's unnecessary. Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 98426234d416..23573fe3fc7d 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -435,11 +435,6 @@ static void nvme_requeue_work(struct work_struct *work) next = bio->bi_next; bio->bi_next = NULL; - /* - * Reset disk to the mpath node and resubmit to select a new - * path. - */ - bio_set_dev(bio, head->disk->part0); submit_bio_noacct(bio); } }