dm mpath: take m->lock spinlock when testing QUEUE_IF_NO_PATH
authorMike Snitzer <snitzer@redhat.com>
Wed, 10 Jun 2020 20:07:57 +0000 (16:07 -0400)
committerMike Snitzer <snitzer@redhat.com>
Mon, 13 Jul 2020 15:47:32 +0000 (11:47 -0400)
commita271a89c6e4773478b1c4f8213dfe8351ea66723
tree441d280d312781aaba5dbbfd6611184109f007c8
parent69cea0d45a618ad4ae74f36386ef1af5128b2b19
dm mpath: take m->lock spinlock when testing QUEUE_IF_NO_PATH

Fix multipath_end_io, multipath_end_io_bio and multipath_busy to take
m->lock while testing if MPATHF_QUEUE_IF_NO_PATH bit is set.  These are
all slow-path cases when no paths are available so extra locking isn't a
performance hit.  Correctness matters most.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c