Commit 2ba262fb authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

staging: lustre: replace OBDO_FREE with kmem_cache_free

Use kmem_cache_free directly instead of wrapping macro.
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 131637b8
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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)
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment