[dm-devel] [dm-4.6 PATCH v2 14/15] dm mpath: reduce granularity of locking in __multipath_map
Mike Snitzer
snitzer at redhat.com
Sun Feb 7 15:53:36 UTC 2016
No need to hold m->lock after path has been selected (and 'struct
multipath' state updated).
Signed-off-by: Mike Snitzer <snitzer at redhat.com>
---
drivers/md/dm-mpath.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 7986446..199d3d3 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -427,18 +427,18 @@ static int __multipath_map(struct dm_target *ti, struct request *clone,
goto out_unlock;
}
+ spin_unlock_irq(&m->lock);
+
mpio = set_mpio(m, map_context);
if (!mpio)
/* ENOMEM, requeue */
- goto out_unlock;
+ return r;
mpio->pgpath = pgpath;
mpio->nr_bytes = nr_bytes;
bdev = pgpath->path.dev->bdev;
- spin_unlock_irq(&m->lock);
-
if (clone) {
/*
* Old request-based interface: allocated clone is passed in.
--
2.5.4 (Apple Git-61)
More information about the dm-devel
mailing list