Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140313
b: refs/heads/master
c: 7d62a97
h: refs/heads/master
i:
  140311: 6b869ed
v: v3
  • Loading branch information
Sunil Mushran authored and Mark Fasheh committed Apr 3, 2009
1 parent f8582f1 commit 79a023b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 23 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: 6800791ab773453bdec337efb3f0cec6557f3bb3
refs/heads/master: 7d62a978a8c85cd82301615840d744f0d83b87e7
21 changes: 18 additions & 3 deletions trunk/fs/ocfs2/dlm/dlmcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -858,9 +858,7 @@ struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm,
unsigned int len);

int dlm_is_host_down(int errno);
void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
u8 owner);

struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm,
const char *lockid,
int namelen,
Expand Down Expand Up @@ -1123,6 +1121,23 @@ static inline int dlm_node_iter_next(struct dlm_node_iter *iter)
return bit;
}

static inline void dlm_set_lockres_owner(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
u8 owner)
{
assert_spin_locked(&res->spinlock);

res->owner = owner;
}

static inline void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
u8 owner)
{
assert_spin_locked(&res->spinlock);

if (owner != res->owner)
dlm_set_lockres_owner(dlm, res, owner);
}

#endif /* DLMCOMMON_H */
19 changes: 0 additions & 19 deletions trunk/fs/ocfs2/dlm/dlmmaster.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,25 +511,6 @@ void dlm_destroy_master_caches(void)
kmem_cache_destroy(dlm_lockres_cache);
}

static void dlm_set_lockres_owner(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res,
u8 owner)
{
assert_spin_locked(&res->spinlock);

res->owner = owner;
}

void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res, u8 owner)
{
assert_spin_locked(&res->spinlock);

if (owner != res->owner)
dlm_set_lockres_owner(dlm, res, owner);
}


static void dlm_lockres_release(struct kref *kref)
{
struct dlm_lock_resource *res;
Expand Down

0 comments on commit 79a023b

Please sign in to comment.