No need to hold m->lock after path has been selected (and 'struct
multipath' state updated).

Signed-off-by: Mike Snitzer <snit...@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)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

Reply via email to