Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 95c4f581 authored by Mark Fasheh's avatar Mark Fasheh
Browse files

ocfs2: inline dlm_lockres_get()



It's called on every lookup so this might help performance a bit.

Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent 4198985f
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -690,7 +690,12 @@ void dlm_lockres_calc_usage(struct dlm_ctxt *dlm,
			    struct dlm_lock_resource *res);
void dlm_purge_lockres(struct dlm_ctxt *dlm,
		       struct dlm_lock_resource *lockres);
void dlm_lockres_get(struct dlm_lock_resource *res);
static inline void dlm_lockres_get(struct dlm_lock_resource *res)
{
	/* This is called on every lookup, so it might be worth
	 * inlining. */
	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,
+0 −5
Original line number Diff line number Diff line
@@ -579,11 +579,6 @@ static void dlm_lockres_release(struct kref *kref)
	kfree(res);
}

void dlm_lockres_get(struct dlm_lock_resource *res)
{
	kref_get(&res->refs);
}

void dlm_lockres_put(struct dlm_lock_resource *res)
{
	kref_put(&res->refs, dlm_lockres_release);