diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lov_request.c')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_request.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index 416e42ed7792..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); } @@ -202,7 +202,7 @@ static int common_attr_done(struct lov_request_set *set) if (!atomic_read(&set->set_success)) return -EIO; - OBDO_ALLOC(tmp_oa); + tmp_oa = kmem_cache_alloc(obdo_cachep, GFP_NOFS | __GFP_ZERO); if (tmp_oa == NULL) { rc = -ENOMEM; goto out; @@ -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; } @@ -309,7 +309,8 @@ int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - OBDO_ALLOC(req->rq_oi.oi_oa); + req->rq_oi.oi_oa = kmem_cache_alloc(obdo_cachep, + GFP_NOFS | __GFP_ZERO); if (req->rq_oi.oi_oa == NULL) { kfree(req); rc = -ENOMEM; @@ -319,7 +320,6 @@ int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, sizeof(*req->rq_oi.oi_oa)); req->rq_oi.oi_oa->o_oi = loi->loi_oi; req->rq_oi.oi_cb_up = cb_getattr_update; - req->rq_oi.oi_capa = oinfo->oi_capa; lov_set_add_req(req, set); } @@ -392,7 +392,8 @@ int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - OBDO_ALLOC(req->rq_oi.oi_oa); + req->rq_oi.oi_oa = kmem_cache_alloc(obdo_cachep, + GFP_NOFS | __GFP_ZERO); if (req->rq_oi.oi_oa == NULL) { kfree(req); rc = -ENOMEM; @@ -507,7 +508,8 @@ int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - OBDO_ALLOC(req->rq_oi.oi_oa); + req->rq_oi.oi_oa = kmem_cache_alloc(obdo_cachep, + GFP_NOFS | __GFP_ZERO); if (req->rq_oi.oi_oa == NULL) { kfree(req); rc = -ENOMEM; @@ -518,7 +520,6 @@ int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_oi.oi_oa->o_oi = loi->loi_oi; req->rq_oi.oi_oa->o_stripe_idx = i; req->rq_oi.oi_cb_up = cb_setattr_update; - req->rq_oi.oi_capa = oinfo->oi_capa; if (oinfo->oi_oa->o_valid & OBD_MD_FLSIZE) { int off = lov_stripe_offset(oinfo->oi_md, |