aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
diff options
context:
space:
mode:
authorMike Rapoport <mike.rapoport@gmail.com>2015-10-20 12:39:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-24 18:46:17 -0700
commitccaabce1171b3194ded7c3961ed33ff09a5a0739 (patch)
tree920a57672b9354978a60bf08d3a946167b41241a /drivers/staging/lustre/lustre/lclient/lcommon_cl.c
parentstaging: lustre: replace OBD_SLAB_ALLOC_PTR with kmem_cache_alloc (diff)
downloadlinux-dev-ccaabce1171b3194ded7c3961ed33ff09a5a0739.tar.xz
linux-dev-ccaabce1171b3194ded7c3961ed33ff09a5a0739.zip
staging: lustre: replace OBD_SLAB_ALLOC_PTR_GFP with kmem_cache_alloc
The OBD_SLAB_ALLOC_PTR_GFP macro expands to call to kmem_cache_alloc, which may be used directly. 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/lclient/lcommon_cl.c')
-rw-r--r--drivers/staging/lustre/lustre/lclient/lcommon_cl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index ef2e2667cabd..7794bfaba4dd 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -116,7 +116,7 @@ void *ccc_key_init(const struct lu_context *ctx, struct lu_context_key *key)
{
struct ccc_thread_info *info;
- OBD_SLAB_ALLOC_PTR_GFP(info, ccc_thread_kmem, GFP_NOFS);
+ info = kmem_cache_alloc(ccc_thread_kmem, GFP_NOFS | __GFP_ZERO);
if (info == NULL)
info = ERR_PTR(-ENOMEM);
return info;
@@ -135,7 +135,7 @@ void *ccc_session_key_init(const struct lu_context *ctx,
{
struct ccc_session *session;
- OBD_SLAB_ALLOC_PTR_GFP(session, ccc_session_kmem, GFP_NOFS);
+ session = kmem_cache_alloc(ccc_session_kmem, GFP_NOFS | __GFP_ZERO);
if (session == NULL)
session = ERR_PTR(-ENOMEM);
return session;
@@ -251,7 +251,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev,
struct ccc_req *vrq;
int result;
- OBD_SLAB_ALLOC_PTR_GFP(vrq, ccc_req_kmem, GFP_NOFS);
+ vrq = kmem_cache_alloc(ccc_req_kmem, GFP_NOFS | __GFP_ZERO);
if (vrq != NULL) {
cl_req_slice_add(req, &vrq->crq_cl, dev, &ccc_req_ops);
result = 0;
@@ -327,7 +327,7 @@ struct lu_object *ccc_object_alloc(const struct lu_env *env,
struct ccc_object *vob;
struct lu_object *obj;
- OBD_SLAB_ALLOC_PTR_GFP(vob, ccc_object_kmem, GFP_NOFS);
+ vob = kmem_cache_alloc(ccc_object_kmem, GFP_NOFS | __GFP_ZERO);
if (vob != NULL) {
struct cl_object_header *hdr;
@@ -396,7 +396,7 @@ int ccc_lock_init(const struct lu_env *env,
CLOBINVRNT(env, obj, ccc_object_invariant(obj));
- OBD_SLAB_ALLOC_PTR_GFP(clk, ccc_lock_kmem, GFP_NOFS);
+ clk = kmem_cache_alloc(ccc_lock_kmem, GFP_NOFS | __GFP_ZERO);
if (clk != NULL) {
cl_lock_slice_add(lock, &clk->clk_cl, obj, lkops);
result = 0;