[PATCH 08/10] staging: lustre: replace OBD_SLAB_FREE_PTR with kmem_cache_free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use kmem_cache_free directly instead of wrapping macro.

Signed-off-by: Mike Rapoport <mike.rapoport@xxxxxxxxx>
---
 drivers/staging/lustre/lustre/lclient/lcommon_cl.c  | 10 +++++-----
 drivers/staging/lustre/lustre/llite/file.c          |  2 +-
 drivers/staging/lustre/lustre/llite/super25.c       |  2 +-
 drivers/staging/lustre/lustre/llite/vvp_dev.c       |  4 ++--
 drivers/staging/lustre/lustre/llite/xattr_cache.c   |  4 ++--
 drivers/staging/lustre/lustre/lov/lov_dev.c         |  6 +++---
 drivers/staging/lustre/lustre/lov/lov_lock.c        | 10 +++++-----
 drivers/staging/lustre/lustre/lov/lov_object.c      |  2 +-
 drivers/staging/lustre/lustre/lov/lovsub_dev.c      |  2 +-
 drivers/staging/lustre/lustre/lov/lovsub_lock.c     |  2 +-
 drivers/staging/lustre/lustre/lov/lovsub_object.c   |  2 +-
 drivers/staging/lustre/lustre/obdclass/cl_lock.c    |  2 +-
 drivers/staging/lustre/lustre/obdclass/cl_object.c  |  4 ++--
 drivers/staging/lustre/lustre/obdclass/genops.c     |  2 +-
 drivers/staging/lustre/lustre/obdecho/echo_client.c |  8 ++++----
 drivers/staging/lustre/lustre/osc/osc_cache.c       |  2 +-
 drivers/staging/lustre/lustre/osc/osc_dev.c         |  4 ++--
 drivers/staging/lustre/lustre/osc/osc_io.c          |  2 +-
 drivers/staging/lustre/lustre/osc/osc_lock.c        |  2 +-
 drivers/staging/lustre/lustre/osc/osc_object.c      |  2 +-
 drivers/staging/lustre/lustre/osc/osc_quota.c       |  6 +++---
 drivers/staging/lustre/lustre/ptlrpc/client.c       |  2 +-
 22 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
index 7794bfa..0b8e4d2 100644
--- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
+++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c
@@ -127,7 +127,7 @@ void ccc_key_fini(const struct lu_context *ctx,
 {
 	struct ccc_thread_info *info = data;
 
-	OBD_SLAB_FREE_PTR(info, ccc_thread_kmem);
+	kmem_cache_free(ccc_thread_kmem, info);
 }
 
 void *ccc_session_key_init(const struct lu_context *ctx,
@@ -146,7 +146,7 @@ void ccc_session_key_fini(const struct lu_context *ctx,
 {
 	struct ccc_session *session = data;
 
-	OBD_SLAB_FREE_PTR(session, ccc_session_kmem);
+	kmem_cache_free(ccc_session_kmem, session);
 }
 
 struct lu_context_key ccc_key = {
@@ -383,7 +383,7 @@ void ccc_object_free(const struct lu_env *env, struct lu_object *obj)
 
 	lu_object_fini(obj);
 	lu_object_header_fini(obj->lo_header);
-	OBD_SLAB_FREE_PTR(vob, ccc_object_kmem);
+	kmem_cache_free(ccc_object_kmem, vob);
 }
 
 int ccc_lock_init(const struct lu_env *env,
@@ -511,7 +511,7 @@ void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice)
 {
 	struct ccc_lock *clk = cl2ccc_lock(slice);
 
-	OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem);
+	kmem_cache_free(ccc_lock_kmem, clk);
 }
 
 int ccc_lock_enqueue(const struct lu_env *env,
@@ -804,7 +804,7 @@ void ccc_req_completion(const struct lu_env *env,
 		cl_stats_tally(slice->crs_dev, slice->crs_req->crq_type, ioret);
 
 	vrq = cl2ccc_req(slice);
-	OBD_SLAB_FREE_PTR(vrq, ccc_req_kmem);
+	kmem_cache_free(ccc_req_kmem, vrq);
 }
 
 /**
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index f590509..11bf2c6 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -74,7 +74,7 @@ static struct ll_file_data *ll_file_data_get(void)
 static void ll_file_data_put(struct ll_file_data *fd)
 {
 	if (fd != NULL)
-		OBD_SLAB_FREE_PTR(fd, ll_file_data_slab);
+		kmem_cache_free(ll_file_data_slab, fd);
 }
 
 void ll_pack_inode2opdata(struct inode *inode, struct md_op_data *op_data,
diff --git a/drivers/staging/lustre/lustre/llite/super25.c b/drivers/staging/lustre/lustre/llite/super25.c
index 63949948..0131368 100644
--- a/drivers/staging/lustre/lustre/llite/super25.c
+++ b/drivers/staging/lustre/lustre/llite/super25.c
@@ -66,7 +66,7 @@ static void ll_inode_destroy_callback(struct rcu_head *head)
 	struct inode *inode = container_of(head, struct inode, i_rcu);
 	struct ll_inode_info *ptr = ll_i2info(inode);
 
-	OBD_SLAB_FREE_PTR(ptr, ll_inode_cachep);
+	kmem_cache_free(ll_inode_cachep, ptr);
 }
 
 static void ll_destroy_inode(struct inode *inode)
diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c
index 3fe8e63..d16d6cf 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_dev.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c
@@ -90,7 +90,7 @@ static void vvp_key_fini(const struct lu_context *ctx,
 {
 	struct vvp_thread_info *info = data;
 
-	OBD_SLAB_FREE_PTR(info, vvp_thread_kmem);
+	kmem_cache_free(vvp_thread_kmem, info);
 }
 
 static void *vvp_session_key_init(const struct lu_context *ctx,
@@ -109,7 +109,7 @@ static void vvp_session_key_fini(const struct lu_context *ctx,
 {
 	struct vvp_session *session = data;
 
-	OBD_SLAB_FREE_PTR(session, vvp_session_kmem);
+	kmem_cache_free(vvp_session_kmem, session);
 }
 
 struct lu_context_key vvp_key = {
diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c
index ca6cddb..e1e599c 100644
--- a/drivers/staging/lustre/lustre/llite/xattr_cache.c
+++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c
@@ -141,7 +141,7 @@ static int ll_xattr_cache_add(struct list_head *cache,
 err_value:
 	kfree(xattr->xe_name);
 err_name:
-	OBD_SLAB_FREE_PTR(xattr, xattr_kmem);
+	kmem_cache_free(xattr_kmem, xattr);
 
 	return -ENOMEM;
 }
@@ -165,7 +165,7 @@ static int ll_xattr_cache_del(struct list_head *cache,
 		list_del(&xattr->xe_list);
 		kfree(xattr->xe_name);
 		kfree(xattr->xe_value);
-		OBD_SLAB_FREE_PTR(xattr, xattr_kmem);
+		kmem_cache_free(xattr_kmem, xattr);
 
 		return 0;
 	}
diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c
index ed36797..2e8b566 100644
--- a/drivers/staging/lustre/lustre/lov/lov_dev.c
+++ b/drivers/staging/lustre/lustre/lov/lov_dev.c
@@ -124,7 +124,7 @@ static void lov_req_completion(const struct lu_env *env,
 	struct lov_req *lr;
 
 	lr = cl2lov_req(slice);
-	OBD_SLAB_FREE_PTR(lr, lov_req_kmem);
+	kmem_cache_free(lov_req_kmem, lr);
 }
 
 static const struct cl_req_operations lov_req_ops = {
@@ -156,7 +156,7 @@ static void lov_key_fini(const struct lu_context *ctx,
 	struct lov_thread_info *info = data;
 
 	LINVRNT(list_empty(&info->lti_closure.clc_list));
-	OBD_SLAB_FREE_PTR(info, lov_thread_kmem);
+	kmem_cache_free(lov_thread_kmem, info);
 }
 
 struct lu_context_key lov_key = {
@@ -181,7 +181,7 @@ static void lov_session_key_fini(const struct lu_context *ctx,
 {
 	struct lov_session *info = data;
 
-	OBD_SLAB_FREE_PTR(info, lov_session_kmem);
+	kmem_cache_free(lov_session_kmem, info);
 }
 
 struct lu_context_key lov_session_key = {
diff --git a/drivers/staging/lustre/lustre/lov/lov_lock.c b/drivers/staging/lustre/lustre/lov/lov_lock.c
index fe126a77..d866791 100644
--- a/drivers/staging/lustre/lustre/lov/lov_lock.c
+++ b/drivers/staging/lustre/lustre/lov/lov_lock.c
@@ -173,7 +173,7 @@ static struct cl_lock *lov_sublock_alloc(const struct lu_env *env,
 		if (!IS_ERR(sublock))
 			*out = link;
 		else
-			OBD_SLAB_FREE_PTR(link, lov_lock_link_kmem);
+			kmem_cache_free(lov_lock_link_kmem, link);
 	} else
 		sublock = ERR_PTR(-ENOMEM);
 	return sublock;
@@ -444,7 +444,7 @@ static void lov_lock_fini(const struct lu_env *env,
 			LASSERT(lck->lls_sub[i].sub_lock == NULL);
 		kvfree(lck->lls_sub);
 	}
-	OBD_SLAB_FREE_PTR(lck, lov_lock_kmem);
+	kmem_cache_free(lov_lock_kmem, lck);
 }
 
 static int lov_lock_enqueue_wait(const struct lu_env *env,
@@ -518,7 +518,7 @@ static int lov_sublock_fill(const struct lu_env *env, struct cl_lock *parent,
 		    lck->lls_sub[idx].sub_lock == NULL) {
 			lov_sublock_adopt(env, lck, sublock, idx, link);
 		} else {
-			OBD_SLAB_FREE_PTR(link, lov_lock_link_kmem);
+			kmem_cache_free(lov_lock_link_kmem, link);
 			/* other thread allocated sub-lock, or enqueue is no
 			 * longer going on */
 			cl_lock_mutex_put(env, parent);
@@ -1027,7 +1027,7 @@ void lov_lock_unlink(const struct lu_env *env,
 	lck->lls_nr_filled--;
 	lu_ref_del(&parent->cll_reference, "lov-child", sub->lss_cl.cls_lock);
 	cl_lock_put(env, parent);
-	OBD_SLAB_FREE_PTR(link, lov_lock_link_kmem);
+	kmem_cache_free(lov_lock_link_kmem, link);
 }
 
 struct lov_lock_link *lov_lock_link_find(const struct lu_env *env,
@@ -1153,7 +1153,7 @@ static void lov_empty_lock_fini(const struct lu_env *env,
 {
 	struct lov_lock *lck = cl2lov_lock(slice);
 
-	OBD_SLAB_FREE_PTR(lck, lov_lock_kmem);
+	kmem_cache_free(lov_lock_kmem, lck);
 }
 
 static int lov_empty_lock_print(const struct lu_env *env, void *cookie,
diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c
index 571a06e..c7ff817 100644
--- a/drivers/staging/lustre/lustre/lov/lov_object.c
+++ b/drivers/staging/lustre/lustre/lov/lov_object.c
@@ -808,7 +808,7 @@ static void lov_object_free(const struct lu_env *env, struct lu_object *obj)
 
 	LOV_2DISPATCH_VOID(lov, llo_fini, env, lov, &lov->u);
 	lu_object_fini(obj);
-	OBD_SLAB_FREE_PTR(lov, lov_object_kmem);
+	kmem_cache_free(lov_object_kmem, lov);
 }
 
 static int lov_object_print(const struct lu_env *env, void *cookie,
diff --git a/drivers/staging/lustre/lustre/lov/lovsub_dev.c b/drivers/staging/lustre/lustre/lov/lovsub_dev.c
index 5053bfb..8bc04c8 100644
--- a/drivers/staging/lustre/lustre/lov/lovsub_dev.c
+++ b/drivers/staging/lustre/lustre/lov/lovsub_dev.c
@@ -56,7 +56,7 @@ static void lovsub_req_completion(const struct lu_env *env,
 	struct lovsub_req *lsr;
 
 	lsr = cl2lovsub_req(slice);
-	OBD_SLAB_FREE_PTR(lsr, lovsub_req_kmem);
+	kmem_cache_free(lovsub_req_kmem, lsr);
 }
 
 /**
diff --git a/drivers/staging/lustre/lustre/lov/lovsub_lock.c b/drivers/staging/lustre/lustre/lov/lovsub_lock.c
index 88373e8..1a3e30a 100644
--- a/drivers/staging/lustre/lustre/lov/lovsub_lock.c
+++ b/drivers/staging/lustre/lustre/lov/lovsub_lock.c
@@ -59,7 +59,7 @@ static void lovsub_lock_fini(const struct lu_env *env,
 
 	lsl = cl2lovsub_lock(slice);
 	LASSERT(list_empty(&lsl->lss_parents));
-	OBD_SLAB_FREE_PTR(lsl, lovsub_lock_kmem);
+	kmem_cache_free(lovsub_lock_kmem, lsl);
 }
 
 static void lovsub_parent_lock(const struct lu_env *env, struct lov_lock *lov)
diff --git a/drivers/staging/lustre/lustre/lov/lovsub_object.c b/drivers/staging/lustre/lustre/lov/lovsub_object.c
index 5c94d0b..d775e28 100644
--- a/drivers/staging/lustre/lustre/lov/lovsub_object.c
+++ b/drivers/staging/lustre/lustre/lov/lovsub_object.c
@@ -91,7 +91,7 @@ static void lovsub_object_free(const struct lu_env *env, struct lu_object *obj)
 
 	lu_object_fini(obj);
 	lu_object_header_fini(&los->lso_header.coh_lu);
-	OBD_SLAB_FREE_PTR(los, lovsub_object_kmem);
+	kmem_cache_free(lovsub_object_kmem, los);
 }
 
 static int lovsub_object_print(const struct lu_env *env, void *cookie,
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
index b9227ab..5621beb 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c
@@ -270,7 +270,7 @@ static void cl_lock_free(const struct lu_env *env, struct cl_lock *lock)
 	lu_ref_fini(&lock->cll_reference);
 	lu_ref_fini(&lock->cll_holders);
 	mutex_destroy(&lock->cll_guard);
-	OBD_SLAB_FREE_PTR(lock, cl_lock_kmem);
+	kmem_cache_free(cl_lock_kmem, lock);
 }
 
 /**
diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c
index b7d0f26..f59c03c 100644
--- a/drivers/staging/lustre/lustre/obdclass/cl_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c
@@ -680,7 +680,7 @@ static struct lu_env *cl_env_new(__u32 ctx_tags, __u32 ses_tags, void *debug)
 				lu_env_fini(env);
 		}
 		if (rc != 0) {
-			OBD_SLAB_FREE_PTR(cle, cl_env_kmem);
+			kmem_cache_free(cl_env_kmem, cle);
 			env = ERR_PTR(rc);
 		} else {
 			CL_ENV_INC(create);
@@ -696,7 +696,7 @@ static void cl_env_fini(struct cl_env *cle)
 	CL_ENV_DEC(total);
 	lu_context_fini(&cle->ce_lu.le_ctx);
 	lu_context_fini(&cle->ce_ses);
-	OBD_SLAB_FREE_PTR(cle, cl_env_kmem);
+	kmem_cache_free(cl_env_kmem, cle);
 }
 
 static inline struct cl_env *cl_env_container(struct lu_env *env)
diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c
index 6fd5889..6477aeb 100644
--- a/drivers/staging/lustre/lustre/obdclass/genops.c
+++ b/drivers/staging/lustre/lustre/obdclass/genops.c
@@ -85,7 +85,7 @@ static void obd_device_free(struct obd_device *obd)
 		LBUG();
 	}
 	lu_ref_fini(&obd->obd_reference);
-	OBD_SLAB_FREE_PTR(obd, obd_device_cachep);
+	kmem_cache_free(obd_device_cachep, obd);
 }
 
 static struct obd_type *class_search_type(const char *name)
diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index 19d1664..6751382 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -337,7 +337,7 @@ static void echo_lock_fini(const struct lu_env *env,
 	struct echo_lock *ecl = cl2echo_lock(slice);
 
 	LASSERT(list_empty(&ecl->el_chain));
-	OBD_SLAB_FREE_PTR(ecl, echo_lock_kmem);
+	kmem_cache_free(echo_lock_kmem, ecl);
 }
 
 static void echo_lock_delete(const struct lu_env *env,
@@ -530,7 +530,7 @@ static void echo_object_free(const struct lu_env *env, struct lu_object *obj)
 
 	if (eco->eo_lsm)
 		echo_free_memmd(eco->eo_dev, &eco->eo_lsm);
-	OBD_SLAB_FREE_PTR(eco, echo_object_kmem);
+	kmem_cache_free(echo_object_kmem, eco);
 }
 
 static int echo_object_print(const struct lu_env *env, void *cookie,
@@ -641,7 +641,7 @@ static void echo_thread_key_fini(const struct lu_context *ctx,
 {
 	struct echo_thread_info *info = data;
 
-	OBD_SLAB_FREE_PTR(info, echo_thread_kmem);
+	kmem_cache_free(echo_thread_kmem, info);
 }
 
 static void echo_thread_key_exit(const struct lu_context *ctx,
@@ -672,7 +672,7 @@ static void echo_session_key_fini(const struct lu_context *ctx,
 {
 	struct echo_session_info *session = data;
 
-	OBD_SLAB_FREE_PTR(session, echo_session_kmem);
+	kmem_cache_free(echo_session_kmem, session);
 }
 
 static void echo_session_key_exit(const struct lu_context *ctx,
diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
index dae13d9..cfb83bc 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cache.c
+++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
@@ -365,7 +365,7 @@ static struct osc_extent *osc_extent_alloc(struct osc_object *obj)
 
 static void osc_extent_free(struct osc_extent *ext)
 {
-	OBD_SLAB_FREE_PTR(ext, osc_extent_kmem);
+	kmem_cache_free(osc_extent_kmem, ext);
 }
 
 static struct osc_extent *osc_extent_get(struct osc_extent *ext)
diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c b/drivers/staging/lustre/lustre/osc/osc_dev.c
index f10757e..69b523c 100644
--- a/drivers/staging/lustre/lustre/osc/osc_dev.c
+++ b/drivers/staging/lustre/lustre/osc/osc_dev.c
@@ -133,7 +133,7 @@ static void osc_key_fini(const struct lu_context *ctx,
 {
 	struct osc_thread_info *info = data;
 
-	OBD_SLAB_FREE_PTR(info, osc_thread_kmem);
+	kmem_cache_free(osc_thread_kmem, info);
 }
 
 struct lu_context_key osc_key = {
@@ -158,7 +158,7 @@ static void osc_session_fini(const struct lu_context *ctx,
 {
 	struct osc_session *info = data;
 
-	OBD_SLAB_FREE_PTR(info, osc_session_kmem);
+	kmem_cache_free(osc_session_kmem, info);
 }
 
 struct lu_context_key osc_session_key = {
diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c
index 9f995e7..d413496 100644
--- a/drivers/staging/lustre/lustre/osc/osc_io.c
+++ b/drivers/staging/lustre/lustre/osc/osc_io.c
@@ -700,7 +700,7 @@ static void osc_req_completion(const struct lu_env *env,
 	struct osc_req *or;
 
 	or = cl2osc_req(slice);
-	OBD_SLAB_FREE_PTR(or, osc_req_kmem);
+	kmem_cache_free(osc_req_kmem, or);
 }
 
 /**
diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c
index fbeaa1d..194490d 100644
--- a/drivers/staging/lustre/lustre/osc/osc_lock.c
+++ b/drivers/staging/lustre/lustre/osc/osc_lock.c
@@ -251,7 +251,7 @@ static void osc_lock_fini(const struct lu_env *env,
 	LASSERT(atomic_read(&ols->ols_pageref) == 0 ||
 		atomic_read(&ols->ols_pageref) == _PAGEREF_MAGIC);
 
-	OBD_SLAB_FREE_PTR(ols, osc_lock_kmem);
+	kmem_cache_free(osc_lock_kmem, ols);
 }
 
 static void osc_lock_build_policy(const struct lu_env *env,
diff --git a/drivers/staging/lustre/lustre/osc/osc_object.c b/drivers/staging/lustre/lustre/osc/osc_object.c
index 5ed88ae..ba57f8d 100644
--- a/drivers/staging/lustre/lustre/osc/osc_object.c
+++ b/drivers/staging/lustre/lustre/osc/osc_object.c
@@ -122,7 +122,7 @@ static void osc_object_free(const struct lu_env *env, struct lu_object *obj)
 	LASSERT(atomic_read(&osc->oo_nr_writes) == 0);
 
 	lu_object_fini(obj);
-	OBD_SLAB_FREE_PTR(osc, osc_object_kmem);
+	kmem_cache_free(osc_object_kmem, osc);
 }
 
 int osc_lvb_print(const struct lu_env *env, void *cookie,
diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c b/drivers/staging/lustre/lustre/osc/osc_quota.c
index 98b9bcd..df8cfb4 100644
--- a/drivers/staging/lustre/lustre/osc/osc_quota.c
+++ b/drivers/staging/lustre/lustre/osc/osc_quota.c
@@ -104,7 +104,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
 			/* race with others? */
 			if (rc == -EALREADY) {
 				rc = 0;
-				OBD_SLAB_FREE_PTR(oqi, osc_quota_kmem);
+				kmem_cache_free(osc_quota_kmem, oqi);
 			}
 
 			CDEBUG(D_QUOTA, "%s: setdq to insert for %s %d (%d)\n",
@@ -120,7 +120,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
 			oqi = cfs_hash_del_key(cli->cl_quota_hash[type],
 					       &qid[type]);
 			if (oqi)
-				OBD_SLAB_FREE_PTR(oqi, osc_quota_kmem);
+				kmem_cache_free(osc_quota_kmem, oqi);
 
 			CDEBUG(D_QUOTA, "%s: setdq to remove for %s %d (%p)\n",
 			       cli->cl_import->imp_obd->obd_name,
@@ -186,7 +186,7 @@ oqi_exit(struct cfs_hash *hs, struct hlist_node *hnode)
 
 	oqi = hlist_entry(hnode, struct osc_quota_info, oqi_hash);
 
-	OBD_SLAB_FREE_PTR(oqi, osc_quota_kmem);
+	kmem_cache_free(osc_quota_kmem, oqi);
 }
 
 #define HASH_QUOTA_BKT_BITS 5
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
index 413801d..6d23cfa 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -415,7 +415,7 @@ struct ptlrpc_request *ptlrpc_request_cache_alloc(gfp_t flags)
 
 void ptlrpc_request_cache_free(struct ptlrpc_request *req)
 {
-	OBD_SLAB_FREE_PTR(req, request_cache);
+	kmem_cache_free(request_cache, req);
 }
 
 /**
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux