memory.c (9cdf083f981b8d37b3212400a359368661385099) memory.c (c376222960ae91d5ffb9197ee36771aaed1d9f90)
1/******************************************************************************
2*******************************************************************************
3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
6**
7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions

--- 62 unchanged lines hidden (view full) ---

71 free_lvb(r->res_lvbptr);
72 kfree(r);
73}
74
75struct dlm_lkb *allocate_lkb(struct dlm_ls *ls)
76{
77 struct dlm_lkb *lkb;
78
1/******************************************************************************
2*******************************************************************************
3**
4** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
5** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
6**
7** This copyrighted material is made available to anyone wishing to use,
8** modify, copy, or redistribute it subject to the terms and conditions

--- 62 unchanged lines hidden (view full) ---

71 free_lvb(r->res_lvbptr);
72 kfree(r);
73}
74
75struct dlm_lkb *allocate_lkb(struct dlm_ls *ls)
76{
77 struct dlm_lkb *lkb;
78
79 lkb = kmem_cache_alloc(lkb_cache, GFP_KERNEL);
80 if (lkb)
81 memset(lkb, 0, sizeof(*lkb));
79 lkb = kmem_cache_zalloc(lkb_cache, GFP_KERNEL);
82 return lkb;
83}
84
85void free_lkb(struct dlm_lkb *lkb)
86{
87 if (lkb->lkb_flags & DLM_IFL_USER) {
88 struct dlm_user_args *ua;
89 ua = (struct dlm_user_args *)lkb->lkb_astparam;

--- 27 unchanged lines hidden ---
80 return lkb;
81}
82
83void free_lkb(struct dlm_lkb *lkb)
84{
85 if (lkb->lkb_flags & DLM_IFL_USER) {
86 struct dlm_user_args *ua;
87 ua = (struct dlm_user_args *)lkb->lkb_astparam;

--- 27 unchanged lines hidden ---