From 2ba262fb6a15994542d77c662d82484990eb18cb Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Tue, 20 Oct 2015 12:39:46 +0300 Subject: [PATCH] staging: lustre: replace OBDO_FREE with kmem_cache_free Use kmem_cache_free directly instead of wrapping macro. Signed-off-by: Mike Rapoport Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/llite_close.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/namei.c | 2 +- drivers/staging/lustre/lustre/lov/lov_request.c | 4 ++-- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 02c9910c43ff..e724a1425ab9 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1295,7 +1295,7 @@ static int ll_lov_recreate(struct inode *inode, struct ost_id *oi, u32 ost_idx) goto out; out: ccc_inode_lsm_put(inode, lsm); - OBDO_FREE(oa); + kmem_cache_free(obdo_cachep, oa); return rc; } diff --git a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c index 8ee1eb400c06..3f348a3aad43 100644 --- a/drivers/staging/lustre/lustre/llite/llite_close.c +++ b/drivers/staging/lustre/lustre/llite/llite_close.c @@ -252,7 +252,7 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data) NULL, 0, NULL, 0, &request, NULL); ptlrpc_req_finished(request); - OBDO_FREE(oa); + kmem_cache_free(obdo_cachep, oa); return rc; } diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index cfb60c8f6a02..4a8c759fef42 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1789,7 +1789,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, OBD_MD_FLGROUP; obdo_set_parent_fid(oinfo.oi_oa, &ll_i2info(inode)->lli_fid); rc = obd_setattr_rqset(sbi->ll_dt_exp, &oinfo, NULL); - OBDO_FREE(oinfo.oi_oa); + kmem_cache_free(obdo_cachep, oinfo.oi_oa); ccc_inode_lsm_put(inode, lsm); if (rc && rc != -EPERM && rc != -EACCES) diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index e069f3115271..2ca22001a534 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -933,7 +933,7 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) POSTID(&lsm->lsm_oi), rc); out_free_memmd: obd_free_memmd(ll_i2dtexp(dir), &lsm); - OBDO_FREE(oa); + kmem_cache_free(obdo_cachep, oa); out: return rc; } diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index f4c70194900c..1a150c26798d 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -67,7 +67,7 @@ void lov_finish_set(struct lov_request_set *set) list_del_init(&req->rq_link); if (req->rq_oi.oi_oa) - OBDO_FREE(req->rq_oi.oi_oa); + kmem_cache_free(obdo_cachep, req->rq_oi.oi_oa); kfree(req->rq_oi.oi_osfs); kfree(req); } @@ -236,7 +236,7 @@ static int common_attr_done(struct lov_request_set *set) memcpy(set->set_oi->oi_oa, tmp_oa, sizeof(*set->set_oi->oi_oa)); out: if (tmp_oa) - OBDO_FREE(tmp_oa); + kmem_cache_free(obdo_cachep, tmp_oa); return rc; } diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 58c466420d3c..57189ad907d0 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -878,7 +878,7 @@ static int osc_shrink_grant_interpret(const struct lu_env *env, LASSERT(body); osc_update_grant(cli, body); out: - OBDO_FREE(oa); + kmem_cache_free(obdo_cachep, oa); return rc; } @@ -1789,7 +1789,7 @@ static int brw_interpret(const struct lu_env *env, } cl_object_put(env, obj); } - OBDO_FREE(aa->aa_oa); + kmem_cache_free(obdo_cachep, aa->aa_oa); cl_req_completion(env, aa->aa_clerq, rc < 0 ? rc : req->rq_bulk->bd_nob_transferred); @@ -2005,7 +2005,7 @@ out: LASSERT(req == NULL); if (oa) - OBDO_FREE(oa); + kmem_cache_free(obdo_cachep, oa); kfree(pga); /* this should happen rarely and is pretty bad, it makes the * pending list not follow the dirty order */ -- 2.20.1