staging: lustre: replace OBDO_FREE with kmem_cache_free
authorMike Rapoport <mike.rapoport@gmail.com>
Tue, 20 Oct 2015 09:39:46 +0000 (12:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:44:26 +0000 (18:44 -0700)
Use kmem_cache_free directly instead of wrapping macro.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_close.c
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/llite/namei.c
drivers/staging/lustre/lustre/lov/lov_request.c
drivers/staging/lustre/lustre/osc/osc_request.c

index 02c9910c43ff8b5e0fe1a9fcd2f40550e3f512a1..e724a1425ab929449d33b4a05f4dec2b6b22d43d 100644 (file)
@@ -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;
 }
 
index 8ee1eb400c068371605ab8f5d8b510567dbbbb9b..3f348a3aad43f58bd63b605c36e7588d0a57e04b 100644 (file)
@@ -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;
 }
 
index cfb60c8f6a02abc3a226794d934da09b4707e236..4a8c759fef42c4db97089658723df050113330ef 100644 (file)
@@ -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)
index e069f3115271249d3b2d11e376667bc039b503f4..2ca22001a534d87759e644151da517368338ad4a 100644 (file)
@@ -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;
 }
index f4c70194900ceeaa9d73ab9374f890231428deea..1a150c26798dee432482b6c5c208d02cb41c5aa9 100644 (file)
@@ -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;
 
 }
index 58c466420d3cd04517a77fb4d0c914caa0fe92f1..57189ad907d07ff96cdebd6af4d5b4cb5e9229d4 100644 (file)
@@ -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 */