diff options
author | Mark Fasheh <mark.fasheh@oracle.com> | 2006-03-10 16:44:00 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-06-26 17:42:41 -0400 |
commit | 95c4f581d6551de55cf5b8693db98b01ce07021b (patch) | |
tree | d453b4b25c4bb66f58e2671fec8c36394875bef8 /fs | |
parent | 4198985f7ae119a23f83503a692dd822bd574080 (diff) |
ocfs2: inline dlm_lockres_get()
It's called on every lookup so this might help performance a bit.
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 7 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index 3b675368762e..87612819c13b 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -690,7 +690,12 @@ void dlm_lockres_calc_usage(struct dlm_ctxt *dlm, | |||
690 | struct dlm_lock_resource *res); | 690 | struct dlm_lock_resource *res); |
691 | void dlm_purge_lockres(struct dlm_ctxt *dlm, | 691 | void dlm_purge_lockres(struct dlm_ctxt *dlm, |
692 | struct dlm_lock_resource *lockres); | 692 | struct dlm_lock_resource *lockres); |
693 | void dlm_lockres_get(struct dlm_lock_resource *res); | 693 | static inline void dlm_lockres_get(struct dlm_lock_resource *res) |
694 | { | ||
695 | /* This is called on every lookup, so it might be worth | ||
696 | * inlining. */ | ||
697 | kref_get(&res->refs); | ||
698 | } | ||
694 | void dlm_lockres_put(struct dlm_lock_resource *res); | 699 | void dlm_lockres_put(struct dlm_lock_resource *res); |
695 | void __dlm_unhash_lockres(struct dlm_lock_resource *res); | 700 | void __dlm_unhash_lockres(struct dlm_lock_resource *res); |
696 | void __dlm_insert_lockres(struct dlm_ctxt *dlm, | 701 | void __dlm_insert_lockres(struct dlm_ctxt *dlm, |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 953aa8421be4..f1fbf2f4e5d6 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -579,11 +579,6 @@ static void dlm_lockres_release(struct kref *kref) | |||
579 | kfree(res); | 579 | kfree(res); |
580 | } | 580 | } |
581 | 581 | ||
582 | void dlm_lockres_get(struct dlm_lock_resource *res) | ||
583 | { | ||
584 | kref_get(&res->refs); | ||
585 | } | ||
586 | |||
587 | void dlm_lockres_put(struct dlm_lock_resource *res) | 582 | void dlm_lockres_put(struct dlm_lock_resource *res) |
588 | { | 583 | { |
589 | kref_put(&res->refs, dlm_lockres_release); | 584 | kref_put(&res->refs, dlm_lockres_release); |