From 99f7a9fcdb6b70e15565bb4e6df7ee0a2d8d2e95 Mon Sep 17 00:00:00 2001 From: Wengang Wang Date: Fri, 16 Jul 2010 23:13:33 +0800 Subject: [PATCH] --- yaml --- r: 209275 b: refs/heads/master c: 6d98c3ccb52f692f1a60339dde7c700686a5568b h: refs/heads/master i: 209273: 828e8330dc7b30b40d491ea4dbc015df2bd9a18b 209271: d7699a63bd982d016360c4a6267b447be560467f v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/dlm/dlmmaster.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index b80a1ab3f6c6..6fdbde5473a9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6eda3dd33f8a0ce58ee56a11351758643a698db4 +refs/heads/master: 6d98c3ccb52f692f1a60339dde7c700686a5568b diff --git a/trunk/fs/ocfs2/dlm/dlmmaster.c b/trunk/fs/ocfs2/dlm/dlmmaster.c index 94b97fc6a88e..6d098b89d46e 100644 --- a/trunk/fs/ocfs2/dlm/dlmmaster.c +++ b/trunk/fs/ocfs2/dlm/dlmmaster.c @@ -3050,8 +3050,6 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data, /* check for pre-existing lock */ spin_lock(&dlm->spinlock); res = __dlm_lookup_lockres(dlm, name, namelen, hash); - spin_lock(&dlm->master_lock); - if (res) { spin_lock(&res->spinlock); if (res->state & DLM_LOCK_RES_RECOVERING) { @@ -3069,14 +3067,15 @@ int dlm_migrate_request_handler(struct o2net_msg *msg, u32 len, void *data, spin_unlock(&res->spinlock); } + spin_lock(&dlm->master_lock); /* ignore status. only nonzero status would BUG. */ ret = dlm_add_migration_mle(dlm, res, mle, &oldmle, name, namelen, migrate->new_master, migrate->master); -unlock: spin_unlock(&dlm->master_lock); +unlock: spin_unlock(&dlm->spinlock); if (oldmle) {