From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: [dm-4.6 PATCH v2 14/15] dm mpath: reduce granularity of locking in __multipath_map Date: Sun, 7 Feb 2016 10:53:36 -0500 Message-ID: <1454860417-3203-15-git-send-email-snitzer@redhat.com> References: <1454860417-3203-1-git-send-email-snitzer@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1454860417-3203-1-git-send-email-snitzer@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: dm-devel@redhat.com Cc: Mike Snitzer , Sagi Grimberg List-Id: dm-devel.ids No need to hold m->lock after path has been selected (and 'struct multipath' state updated). Signed-off-by: Mike Snitzer --- 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)