]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: multipath: round-robin: fix single non-optimized path case
authorMartin Wilck <mwilck@suse.com>
Thu, 6 Aug 2020 13:19:31 +0000 (15:19 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Aug 2020 23:14:27 +0000 (17:14 -0600)
commitd9f4944cf93088974e8e35a1135d8514acbc12b5
tree94c3bcdc93a6a5236116a37cc2dca3c3f04d83f2
parent1711c2cfa0d625671a7af06bcc4ea7448f2bfe5c
nvme: multipath: round-robin: fix single non-optimized path case

If there's only one usable, non-optimized path, nvme_round_robin_path()
returns NULL, which is wrong. Fix it by falling back to "old", like in
the single optimized path case. Also, if the active path isn't changed,
there's no need to re-assign the pointer.

Fixes: 2122187ed47d ("nvme-multipath: fix logic for non-optimized paths")
Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin George <marting@netapp.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/multipath.c