1 From: Sunil Mushran <sunil.mushran@oracle.com>
2 Date: Thu, 26 Feb 2009 15:00:45 -0800
3 Subject: ocfs2/dlm: dlm_set_lockres_owner() and dlm_change_lockres_owner() inlined
7 This patch inlines dlm_set_lockres_owner() and dlm_change_lockres_owner().
9 Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
10 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12 fs/ocfs2/dlm/dlmcommon.h | 21 ++++++++++++++++++---
13 fs/ocfs2/dlm/dlmmaster.c | 19 -------------------
14 2 files changed, 18 insertions(+), 22 deletions(-)
16 Index: linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmcommon.h
17 ===================================================================
18 --- linux-2.6.27-sle11_ocfs2_update.orig/fs/ocfs2/dlm/dlmcommon.h
19 +++ linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmcommon.h
20 @@ -858,9 +858,7 @@ struct dlm_lock_resource * dlm_lookup_lo
23 int dlm_is_host_down(int errno);
24 -void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
25 - struct dlm_lock_resource *res,
28 struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm,
31 @@ -1123,6 +1121,23 @@ static inline int dlm_node_iter_next(str
35 +static inline void dlm_set_lockres_owner(struct dlm_ctxt *dlm,
36 + struct dlm_lock_resource *res,
39 + assert_spin_locked(&res->spinlock);
44 +static inline void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
45 + struct dlm_lock_resource *res,
48 + assert_spin_locked(&res->spinlock);
50 + if (owner != res->owner)
51 + dlm_set_lockres_owner(dlm, res, owner);
54 #endif /* DLMCOMMON_H */
55 Index: linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmmaster.c
56 ===================================================================
57 --- linux-2.6.27-sle11_ocfs2_update.orig/fs/ocfs2/dlm/dlmmaster.c
58 +++ linux-2.6.27-sle11_ocfs2_update/fs/ocfs2/dlm/dlmmaster.c
59 @@ -511,25 +511,6 @@ void dlm_destroy_master_caches(void)
60 kmem_cache_destroy(dlm_lockres_cache);
63 -static void dlm_set_lockres_owner(struct dlm_ctxt *dlm,
64 - struct dlm_lock_resource *res,
67 - assert_spin_locked(&res->spinlock);
72 -void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
73 - struct dlm_lock_resource *res, u8 owner)
75 - assert_spin_locked(&res->spinlock);
77 - if (owner != res->owner)
78 - dlm_set_lockres_owner(dlm, res, owner);
82 static void dlm_lockres_release(struct kref *kref)
84 struct dlm_lock_resource *res;