Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125900
b: refs/heads/master
c: 7b791d6
h: refs/heads/master
v: v3
  • Loading branch information
Sunil Mushran authored and Mark Fasheh committed Jan 5, 2009
1 parent ab84268 commit 1104ed6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b0d4f817ba5de8adb875ace594554a96d7737710
refs/heads/master: 7b791d68562e4ce5ab57cbacb10a1ad4ee33956e
9 changes: 8 additions & 1 deletion trunk/fs/ocfs2/dlm/dlmmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,14 +732,21 @@ struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm,
if (tmpres) {
int dropping_ref = 0;

spin_unlock(&dlm->spinlock);

spin_lock(&tmpres->spinlock);
/* We wait for the other thread that is mastering the resource */
if (tmpres->owner == DLM_LOCK_RES_OWNER_UNKNOWN) {
__dlm_wait_on_lockres(tmpres);
BUG_ON(tmpres->owner == DLM_LOCK_RES_OWNER_UNKNOWN);
}

if (tmpres->owner == dlm->node_num) {
BUG_ON(tmpres->state & DLM_LOCK_RES_DROPPING_REF);
dlm_lockres_grab_inflight_ref(dlm, tmpres);
} else if (tmpres->state & DLM_LOCK_RES_DROPPING_REF)
dropping_ref = 1;
spin_unlock(&tmpres->spinlock);
spin_unlock(&dlm->spinlock);

/* wait until done messaging the master, drop our ref to allow
* the lockres to be purged, start over. */
Expand Down

0 comments on commit 1104ed6

Please sign in to comment.