diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lov_ea.c')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_ea.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 3f51b573e1fb..34c1346f0dc7 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -100,7 +100,7 @@ struct lov_stripe_md *lsm_alloc_plain(__u16 stripe_count, int *size) return NULL; for (i = 0; i < stripe_count; i++) { - OBD_SLAB_ALLOC_PTR_GFP(loi, lov_oinfo_slab, GFP_NOFS); + loi = kmem_cache_alloc(lov_oinfo_slab, GFP_NOFS | __GFP_ZERO); if (loi == NULL) goto err; lsm->lsm_oinfo[i] = loi; @@ -110,7 +110,7 @@ struct lov_stripe_md *lsm_alloc_plain(__u16 stripe_count, int *size) err: while (--i >= 0) - OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, sizeof(*loi)); + kmem_cache_free(lov_oinfo_slab, lsm->lsm_oinfo[i]); kvfree(lsm); return NULL; } @@ -121,8 +121,7 @@ void lsm_free_plain(struct lov_stripe_md *lsm) int i; for (i = 0; i < stripe_count; i++) - OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, - sizeof(struct lov_oinfo)); + kmem_cache_free(lov_oinfo_slab, lsm->lsm_oinfo[i]); kvfree(lsm); } |