reiserfs: Relax reiserfs_xattr_set_handle() while acquiring xattr locks
[safe/jmp/linux-2.6] / fs / dlm / memory.c
index f778386..c1775b8 100644 (file)
@@ -18,7 +18,7 @@
 static struct kmem_cache *lkb_cache;
 
 
-int dlm_memory_init(void)
+int __init dlm_memory_init(void)
 {
        int ret = 0;
 
@@ -39,7 +39,7 @@ char *dlm_allocate_lvb(struct dlm_ls *ls)
 {
        char *p;
 
-       p = kzalloc(ls->ls_lvblen, GFP_KERNEL);
+       p = kzalloc(ls->ls_lvblen, ls->ls_allocation);
        return p;
 }
 
@@ -57,7 +57,7 @@ struct dlm_rsb *dlm_allocate_rsb(struct dlm_ls *ls, int namelen)
 
        DLM_ASSERT(namelen <= DLM_RESNAME_MAXLEN,);
 
-       r = kzalloc(sizeof(*r) + namelen, GFP_KERNEL);
+       r = kzalloc(sizeof(*r) + namelen, ls->ls_allocation);
        return r;
 }
 
@@ -72,7 +72,7 @@ struct dlm_lkb *dlm_allocate_lkb(struct dlm_ls *ls)
 {
        struct dlm_lkb *lkb;
 
-       lkb = kmem_cache_zalloc(lkb_cache, GFP_KERNEL);
+       lkb = kmem_cache_zalloc(lkb_cache, ls->ls_allocation);
        return lkb;
 }
 
@@ -80,7 +80,7 @@ void dlm_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;
+               ua = lkb->lkb_ua;
                if (ua) {
                        if (ua->lksb.sb_lvbptr)
                                kfree(ua->lksb.sb_lvbptr);