summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2007-03-12 13:25:44 -0700
committerMark Fasheh <mark.fasheh@oracle.com>2007-03-14 14:37:35 -0700
commitb36c3f84988eebf38acaccc756e05f6b70e333ab (patch)
treed8e03ce262e6766a440e5db5d5c82b039cfd2131 /fs/ocfs2/dlm
parent3fca0894a4b5e52c278421b04435b88e32b423ad (diff)
downloadop-kernel-dev-b36c3f84988eebf38acaccc756e05f6b70e333ab.zip
op-kernel-dev-b36c3f84988eebf38acaccc756e05f6b70e333ab.tar.gz
ocfs2_dlm: Add missing locks in dlm_empty_lockres
__dlm_lockres_unused() expects the caller to take the lockres spinlock. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm')
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 77e4e61..9229e04 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2730,14 +2730,17 @@ int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
int ret;
int lock_dropped = 0;
+ spin_lock(&res->spinlock);
if (res->owner != dlm->node_num) {
if (!__dlm_lockres_unused(res)) {
mlog(ML_ERROR, "%s:%.*s: this node is not master, "
"trying to free this but locks remain\n",
dlm->name, res->lockname.len, res->lockname.name);
}
+ spin_unlock(&res->spinlock);
goto leave;
}
+ spin_unlock(&res->spinlock);
/* Wheee! Migrate lockres here! Will sleep so drop spinlock. */
spin_unlock(&dlm->spinlock);
OpenPOWER on IntegriCloud