summaryrefslogtreecommitdiffstats
path: root/fs/dlm/memory.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-07-12 16:44:04 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-13 09:25:34 -0400
commit597d0cae0f99f62501e229bed50e8149604015bb (patch)
treeb6cab09ff6fe2246740848164c0a52d5c03136a0 /fs/dlm/memory.c
parent2eb168ca94aba3bcae350ad9b31870955174a218 (diff)
downloadlinux-597d0cae0f99f62501e229bed50e8149604015bb.tar.gz
linux-597d0cae0f99f62501e229bed50e8149604015bb.tar.bz2
linux-597d0cae0f99f62501e229bed50e8149604015bb.zip
[DLM] dlm: user locks
This changes the way the dlm handles user locks. The core dlm is now aware of user locks so they can be dealt with more efficiently. There is no more dlm_device module which previously managed its own duplicate copy of every user lock. Signed-off-by: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/memory.c')
-rw-r--r--fs/dlm/memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/dlm/memory.c b/fs/dlm/memory.c
index f7cf4589fae8..48dfc27861f4 100644
--- a/fs/dlm/memory.c
+++ b/fs/dlm/memory.c
@@ -84,6 +84,15 @@ struct dlm_lkb *allocate_lkb(struct dlm_ls *ls)
void free_lkb(struct dlm_lkb *lkb)
{
+ if (lkb->lkb_flags & DLM_IFL_USER) {
+ struct dlm_user_args *ua;
+ ua = (struct dlm_user_args *)lkb->lkb_astparam;
+ if (ua) {
+ if (ua->lksb.sb_lvbptr)
+ kfree(ua->lksb.sb_lvbptr);
+ kfree(ua);
+ }
+ }
kmem_cache_free(lkb_cache, lkb);
}