]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-multipath: reset bdev to ns head when failover
authorDaniel Wagner <dwagner@suse.de>
Mon, 3 May 2021 17:03:03 +0000 (19:03 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 4 May 2021 07:39:23 +0000 (09:39 +0200)
commitf636c31ba2a65964806f7e98efac3c3b947fc1af
tree1fe8534498736515b24ad6719dece49bdd3cd760
parentfda01ceddc471ecca175f729785490c2b1e8f0ad
nvme-multipath: reset bdev to ns head when failover

When a request finally completes in end_io() after it has failed over,
the bdev pointer can be stale and thus the system can crash. Set the
bdev back to ns head, so the request is map to an active path when
resubmitted.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/multipath.c