Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140316
b: refs/heads/master
c: 516b7e5
h: refs/heads/master
v: v3
  • Loading branch information
Sunil Mushran authored and Mark Fasheh committed Apr 3, 2009
1 parent 6133e29 commit 0e53c84
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 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: 7141514b8307734c117f100c4a3637887c5def45
refs/heads/master: 516b7e52abc7efd61c084b217c61985a403828ed
20 changes: 18 additions & 2 deletions trunk/fs/ocfs2/dlm/dlmthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,28 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm,

spin_lock(&res->spinlock);
if (!__dlm_lockres_unused(res)) {
spin_unlock(&res->spinlock);
mlog(0, "%s:%.*s: tried to purge but not unused\n",
dlm->name, res->lockname.len, res->lockname.name);
return -ENOTEMPTY;
__dlm_print_one_lock_resource(res);
spin_unlock(&res->spinlock);
BUG();
}

if (res->state & DLM_LOCK_RES_MIGRATING) {
mlog(0, "%s:%.*s: Delay dropref as this lockres is "
"being remastered\n", dlm->name, res->lockname.len,
res->lockname.name);
/* Re-add the lockres to the end of the purge list */
if (!list_empty(&res->purge)) {
list_del_init(&res->purge);
list_add_tail(&res->purge, &dlm->purge_list);
}
spin_unlock(&res->spinlock);
return 0;
}

master = (res->owner == dlm->node_num);

if (!master)
res->state |= DLM_LOCK_RES_DROPPING_REF;
spin_unlock(&res->spinlock);
Expand Down

0 comments on commit 0e53c84

Please sign in to comment.