diff options
author | Mike Rapoport <mike.rapoport@gmail.com> | 2015-10-20 12:39:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-24 18:44:26 -0700 |
commit | 131637b811fd8e6c7f2743316f127dcb4407ad7c (patch) | |
tree | 18f04be8935a39c8c16a02c045403a198b9f9d3e /drivers/staging/lustre/lustre/llite | |
parent | 4490ff89b136451940cd8a4a21e2be9396664498 (diff) |
staging: lustre: replace OBDO_ALLOC with kmem_cache_alloc
Use direct call to kmem_cache_alloc instead of wrapping macro
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/file.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_close.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/llite_lib.c | 3 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/namei.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index ad02f2b9e590..02c9910c43ff 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1260,7 +1260,7 @@ static int ll_lov_recreate(struct inode *inode, struct ost_id *oi, u32 ost_idx) int rc = 0; struct lov_stripe_md *lsm = NULL, *lsm2; - OBDO_ALLOC(oa); + oa = kmem_cache_alloc(obdo_cachep, GFP_NOFS | __GFP_ZERO); if (oa == NULL) return -ENOMEM; diff --git a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c index e31cad82d5af..8ee1eb400c06 100644 --- a/drivers/staging/lustre/lustre/llite/llite_close.c +++ b/drivers/staging/lustre/lustre/llite/llite_close.c @@ -221,7 +221,7 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data) inode->i_ino, inode->i_generation, lli->lli_flags); - OBDO_ALLOC(oa); + oa = kmem_cache_alloc(obdo_cachep, GFP_NOFS | __GFP_ZERO); if (!oa) { CERROR("can't allocate memory for Size-on-MDS update.\n"); return -ENOMEM; diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index e874e631e006..cfb60c8f6a02 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1776,7 +1776,8 @@ int ll_iocontrol(struct inode *inode, struct file *file, return 0; } - OBDO_ALLOC(oinfo.oi_oa); + oinfo.oi_oa = kmem_cache_alloc(obdo_cachep, + GFP_NOFS | __GFP_ZERO); if (!oinfo.oi_oa) { ccc_inode_lsm_put(inode, lsm); return -ENOMEM; diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 2ee7d31d78ae..e069f3115271 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -903,7 +903,7 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) } LASSERT(rc >= sizeof(*lsm)); - OBDO_ALLOC(oa); + oa = kmem_cache_alloc(obdo_cachep, GFP_NOFS | __GFP_ZERO); if (oa == NULL) { rc = -ENOMEM; goto out_free_memmd; |