summaryrefslogtreecommitdiff
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-05-13 12:01:33 +0200
committerJoerg Roedel <jroedel@suse.de>2020-05-13 12:01:33 +0200
commitec9b40cffdb68c4ea1ebdcd1648ed6ce15c4449e (patch)
tree27b964f4377bf1ac712c118a6a3fb945476c7da6 /drivers/md/dm-mpath.c
parent3a0ce12e3b8e3cb7d54569a42aec743cc93f4f0d (diff)
parent0e698dfa282211e414076f9dc7e83c1c288314fd (diff)
downloadlinux-ec9b40cffdb68c4ea1ebdcd1648ed6ce15c4449e.tar.gz
linux-ec9b40cffdb68c4ea1ebdcd1648ed6ce15c4449e.tar.bz2
linux-ec9b40cffdb68c4ea1ebdcd1648ed6ce15c4449e.zip
Merge tag 'v5.7-rc4' into core
Linux 5.7-rc4
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 58fd137b6ae1..3e500098132f 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -585,10 +585,12 @@ static struct pgpath *__map_bio(struct multipath *m, struct bio *bio)
/* Do we need to select a new pgpath? */
pgpath = READ_ONCE(m->current_pgpath);
- queue_io = test_bit(MPATHF_QUEUE_IO, &m->flags);
- if (!pgpath || !queue_io)
+ if (!pgpath || !test_bit(MPATHF_QUEUE_IO, &m->flags))
pgpath = choose_pgpath(m, bio->bi_iter.bi_size);
+ /* MPATHF_QUEUE_IO might have been cleared by choose_pgpath. */
+ queue_io = test_bit(MPATHF_QUEUE_IO, &m->flags);
+
if ((pgpath && queue_io) ||
(!pgpath && test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags))) {
/* Queue for the daemon to resubmit */