]> err.no Git - linux-2.6/blobdiff - fs/dlm/memory.c
Pull hp-pci-root into test branch
[linux-2.6] / fs / dlm / memory.c
index f7cf4589fae8fca03d5d5afeeedb4e26328b9fb8..5352b03ff5aa81f9af31c081965f7ae8dd81f90e 100644 (file)
@@ -15,7 +15,7 @@
 #include "config.h"
 #include "memory.h"
 
-static kmem_cache_t *lkb_cache;
+static struct kmem_cache *lkb_cache;
 
 
 int dlm_memory_init(void)
@@ -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);
 }
 
@@ -91,7 +100,8 @@ struct dlm_direntry *allocate_direntry(struct dlm_ls *ls, int namelen)
 {
        struct dlm_direntry *de;
 
-       DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,);
+       DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,
+                  printk("namelen = %d\n", namelen););
 
        de = kmalloc(sizeof(*de) + namelen, GFP_KERNEL);
        if (de)