Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276174
b: refs/heads/master
c: e9f0b6a
h: refs/heads/master
v: v3
  • Loading branch information
Sunil Mushran committed Jul 24, 2011
1 parent d5d8287 commit 9cc67d1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 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: 8d400b81cc83b171ff872587723a37eb7fae9abe
refs/heads/master: e9f0b6a6233105c188064328c3f15e21942d0241
5 changes: 2 additions & 3 deletions trunk/fs/ocfs2/dlm/dlmcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -877,9 +877,8 @@ static inline void dlm_lockres_get(struct dlm_lock_resource *res)
kref_get(&res->refs);
}
void dlm_lockres_put(struct dlm_lock_resource *res);
void __dlm_unhash_lockres(struct dlm_lock_resource *res);
void __dlm_insert_lockres(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res);
void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm,
const char *name,
unsigned int len,
Expand Down
19 changes: 12 additions & 7 deletions trunk/fs/ocfs2/dlm/dlmdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,18 @@ static int dlm_protocol_compare(struct dlm_protocol_version *existing,

static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm);

void __dlm_unhash_lockres(struct dlm_lock_resource *lockres)
void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
{
if (!hlist_unhashed(&lockres->hash_node)) {
hlist_del_init(&lockres->hash_node);
dlm_lockres_put(lockres);
}
if (hlist_unhashed(&res->hash_node))
return;

mlog(0, "%s: Unhash res %.*s\n", dlm->name, res->lockname.len,
res->lockname.name);
hlist_del_init(&res->hash_node);
dlm_lockres_put(res);
}

void __dlm_insert_lockres(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res)
void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
{
struct hlist_head *bucket;
struct qstr *q;
Expand All @@ -180,6 +182,9 @@ void __dlm_insert_lockres(struct dlm_ctxt *dlm,
dlm_lockres_get(res);

hlist_add_head(&res->hash_node, bucket);

mlog(0, "%s: Hash res %.*s\n", dlm->name, res->lockname.len,
res->lockname.name);
}

struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm,
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ocfs2/dlm/dlmthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void dlm_purge_lockres(struct dlm_ctxt *dlm,
BUG();
}

__dlm_unhash_lockres(res);
__dlm_unhash_lockres(dlm, res);

/* lockres is not in the hash now. drop the flag and wake up
* any processes waiting in dlm_get_lock_resource. */
Expand Down

0 comments on commit 9cc67d1

Please sign in to comment.