From d383b173b7526ce510852965d1947514a8ea3b29 Mon Sep 17 00:00:00 2001 From: bobijam Date: Fri, 29 Jun 2007 05:26:09 +0000 Subject: [PATCH] Branch b1_6 b=11815 i=adilger i=wangdi Description: replace obdo_alloc() with OBDO_ALLOC macro Details : nothing special is done in obdo_alloc() function, and for debugging purpose, it needs to be replaced with macros. --- lustre/ChangeLog | 6 ++++++ lustre/include/obd_class.h | 19 ++++++++----------- lustre/include/obd_support.h | 5 +++++ lustre/liblustre/file.c | 4 ++-- lustre/llite/file.c | 13 +++++++------ lustre/llite/llite_lib.c | 11 ++++++----- lustre/llite/namei.c | 4 ++-- lustre/lov/lov_obd.c | 4 ++-- lustre/lov/lov_qos.c | 2 +- lustre/lov/lov_request.c | 24 ++++++++++++------------ lustre/mds/mds_open.c | 4 ++-- lustre/mds/mds_reint.c | 4 ++-- lustre/mds/mds_unlink_open.c | 4 ++-- lustre/obdclass/llog_lvfs.c | 8 ++++---- lustre/obdfilter/filter_log.c | 8 ++++---- lustre/osc/osc_request.c | 14 +++++++------- 16 files changed, 72 insertions(+), 62 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index f11b074..815b232 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -396,6 +396,12 @@ Bugzilla : 12576 Description: Not Check whether lov_tgts is NULL in some lov functions Details : Checking whether lov_tgts is NULL in some functions. +Severity : normal +Bugzilla : 11815 +Description: replace obdo_alloc() with OBDO_ALLOC macro +Details : nothing special is done in obdo_alloc() function, and for + debugging purpose, it needs to be replaced with macros. + -------------------------------------------------------------------------------- 2007-05-03 Cluster File Systems, Inc. diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index d8efd12..d9deddb 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -1382,19 +1382,16 @@ extern void obd_cleanup_caches(void); /* support routines */ extern cfs_mem_cache_t *obdo_cachep; -static inline struct obdo *obdo_alloc(void) -{ - struct obdo *oa; - - OBD_SLAB_ALLOC(oa, obdo_cachep, CFS_ALLOC_STD, sizeof(*oa)); - return oa; -} +#define OBDO_ALLOC(ptr) \ +do { \ + OBD_SLAB_ALLOC_PTR((ptr), obdo_cachep); \ +} while(0) -static inline void obdo_free(struct obdo *oa) -{ - OBD_SLAB_FREE(oa, obdo_cachep, sizeof(*oa)); -} +#define OBDO_FREE(ptr) \ +do { \ + OBD_SLAB_FREE_PTR((ptr), obdo_cachep); \ +} while(0) /* I'm as embarrassed about this as you are. * diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index c70d881..debbf72 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -440,6 +440,11 @@ do { \ (ptr) = (void *)0xdeadbeef; \ } while (0) +#define OBD_SLAB_ALLOC_PTR(ptr, slab) \ + OBD_SLAB_ALLOC((ptr), (slab), CFS_ALLOC_STD, sizeof *(ptr)) +#define OBD_SLAB_FREE_PTR(ptr, slab) \ + OBD_SLAB_FREE((ptr), (slab), sizeof *(ptr)) + #define KEY_IS(str) (keylen >= strlen(key) && strcmp(key, str) == 0) #if defined(__linux__) diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index 7d43699..c9ec160 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -279,7 +279,7 @@ int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir) } LASSERT(rc >= sizeof(*lsm)); - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) GOTO(out_free_memmd, rc = -ENOMEM); @@ -300,7 +300,7 @@ int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir) } rc = obd_destroy(llu_i2obdexp(dir), oa, lsm, &oti, NULL); - obdo_free(oa); + OBDO_FREE(oa); if (rc) CERROR("obd destroy objid 0x"LPX64" error %d\n", lsm->lsm_object_id, rc); diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 0e67513..3c0779e 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -71,7 +71,7 @@ static int ll_close_inode_openhandle(struct inode *inode, if (obd->obd_no_recov) GOTO(out, rc = 0); - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (!oa) RETURN(-ENOMEM); // XXX We leak openhandle and request here. @@ -97,7 +97,7 @@ static int ll_close_inode_openhandle(struct inode *inode, inode->i_ino, rc); } - obdo_free(oa); + OBDO_FREE(oa); if (rc == 0) { rc = ll_objects_destroy(req, inode); @@ -1543,7 +1543,7 @@ static int ll_lov_recreate_obj(struct inode *inode, struct file *file, if (rc) { RETURN(-EFAULT); } - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) RETURN(-ENOMEM); @@ -1573,7 +1573,7 @@ static int ll_lov_recreate_obj(struct inode *inode, struct file *file, GOTO(out, rc); out: up(&lli->lli_size_sem); - obdo_free(oa); + OBDO_FREE(oa); return rc; } @@ -2230,8 +2230,9 @@ int ll_fsync(struct file *file, struct dentry *dentry, int data) ptlrpc_req_finished(req); if (data && lsm) { - struct obdo *oa = obdo_alloc(); + struct obdo *oa; + OBDO_ALLOC(oa); if (!oa) RETURN(rc ? rc : -ENOMEM); @@ -2244,7 +2245,7 @@ int ll_fsync(struct file *file, struct dentry *dentry, int data) 0, OBD_OBJECT_EOF); if (!rc) rc = err; - obdo_free(oa); + OBDO_FREE(oa); } RETURN(rc); diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index f32fa7e..b0b7c43 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1349,7 +1349,8 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) } else if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) { obd_flag flags; struct obd_info oinfo = { { { 0 } } }; - struct obdo *oa = obdo_alloc(); + struct obdo *oa; + OBDO_ALLOC(oa); CDEBUG(D_INODE, "set mtime on OST inode %lu to %lu\n", inode->i_ino, LTIME_S(attr->ia_mtime)); @@ -1370,7 +1371,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL); if (rc) CERROR("obd_setattr_async fails: rc=%d\n", rc); - obdo_free(oa); + OBDO_FREE(oa); } else { rc = -ENOMEM; } @@ -1744,7 +1745,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, RETURN(-EFAULT); oinfo.oi_md = lsm; - oinfo.oi_oa = obdo_alloc(); + OBDO_ALLOC(oinfo.oi_oa); if (!oinfo.oi_oa) RETURN(-ENOMEM); @@ -1758,7 +1759,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, (struct iattr *)&attr, NULL, 0, NULL, 0, &req); ptlrpc_req_finished(req); if (rc || lsm == NULL) { - obdo_free(oinfo.oi_oa); + OBDO_FREE(oinfo.oi_oa); RETURN(rc); } @@ -1769,7 +1770,7 @@ int ll_iocontrol(struct inode *inode, struct file *file, obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER); rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL); - obdo_free(oinfo.oi_oa); + OBDO_FREE(oinfo.oi_oa); if (rc) { if (rc != -EPERM && rc != -EACCES) CERROR("mdc_setattr_async fails: rc = %d\n", rc); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 29b3a64..0af7016 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -1096,7 +1096,7 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) if (rc) GOTO(out_free_memmd, rc); - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) GOTO(out_free_memmd, rc = -ENOMEM); @@ -1117,7 +1117,7 @@ int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir) } rc = obd_destroy(ll_i2obdexp(dir), oa, lsm, &oti, ll_i2mdcexp(dir)); - obdo_free(oa); + OBDO_FREE(oa); if (rc) CERROR("obd destroy objid "LPX64" error %d\n", lsm->lsm_object_id, rc); diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 765e328..6132e65 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -885,7 +885,7 @@ static int lov_clear_orphans(struct obd_export *export, struct obdo *src_oa, lov = &export->exp_obd->u.lov; - tmp_oa = obdo_alloc(); + OBDO_ALLOC(tmp_oa); if (tmp_oa == NULL) RETURN(-ENOMEM); @@ -936,7 +936,7 @@ static int lov_clear_orphans(struct obd_export *export, struct obdo *src_oa, } lov_putref(export->exp_obd); - obdo_free(tmp_oa); + OBDO_FREE(tmp_oa); RETURN(rc); } diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c index 61f0176..2183ca2 100644 --- a/lustre/lov/lov_qos.c +++ b/lustre/lov/lov_qos.c @@ -837,7 +837,7 @@ int qos_prep_create(struct obd_export *exp, struct lov_request_set *set) if (req->rq_oi.oi_md == NULL) GOTO(out_err, rc = -ENOMEM); - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) GOTO(out_err, rc = -ENOMEM); diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c index df404c0..fc3d0d7 100644 --- a/lustre/lov/lov_request.c +++ b/lustre/lov/lov_request.c @@ -61,7 +61,7 @@ static 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); + OBDO_FREE(req->rq_oi.oi_oa); if (req->rq_oi.oi_md) OBD_FREE(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_osfs) @@ -587,7 +587,7 @@ static int create_done(struct obd_export *exp, struct lov_request_set *set, qos_shrink_lsm(set); } - ret_oa = obdo_alloc(); + OBDO_ALLOC(ret_oa); if (ret_oa == NULL) GOTO(cleanup, rc = -ENOMEM); @@ -606,7 +606,7 @@ static int create_done(struct obd_export *exp, struct lov_request_set *set, } ret_oa->o_id = src_oa->o_id; memcpy(src_oa, ret_oa, sizeof(*src_oa)); - obdo_free(ret_oa); + OBDO_FREE(ret_oa); *lsmp = set->set_oi->oi_md; GOTO(done, rc = 0); @@ -747,7 +747,7 @@ static int common_attr_done(struct lov_request_set *set) if (!set->set_success) RETURN(-EIO); - tmp_oa = obdo_alloc(); + OBDO_ALLOC(tmp_oa); if (tmp_oa == NULL) GOTO(out, rc = -ENOMEM); @@ -770,7 +770,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); + OBDO_FREE(tmp_oa); RETURN(rc); } @@ -874,7 +874,7 @@ int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo, if (req == NULL) GOTO(out, rc = -ENOMEM); - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out, rc = -ENOMEM); @@ -890,7 +890,7 @@ int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_buflen = sizeof(*req->rq_oi.oi_md); OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen); if (req->rq_oi.oi_md == NULL) { - obdo_free(req->rq_oi.oi_oa); + OBDO_FREE(req->rq_oi.oi_oa); OBD_FREE(req, sizeof(*req)); GOTO(out, rc = -ENOMEM); } @@ -996,7 +996,7 @@ int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); @@ -1075,7 +1075,7 @@ int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); @@ -1186,7 +1186,7 @@ int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); @@ -1320,7 +1320,7 @@ int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); @@ -1408,7 +1408,7 @@ int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo, req->rq_stripe = i; req->rq_idx = loi->loi_ost_idx; - req->rq_oi.oi_oa = obdo_alloc(); + OBDO_ALLOC(req->rq_oi.oi_oa); if (req->rq_oi.oi_oa == NULL) { OBD_FREE(req, sizeof(*req)); GOTO(out_set, rc = -ENOMEM); diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 2951582..7f69d5d 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -370,7 +370,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset, if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_ALLOC_OBDO)) GOTO(out_ids, rc = -ENOMEM); - oinfo.oi_oa = obdo_alloc(); + OBDO_ALLOC(oinfo.oi_oa); if (oinfo.oi_oa == NULL) GOTO(out_ids, rc = -ENOMEM); oinfo.oi_oa->o_uid = 0; /* must have 0 uid / gid on OST */ @@ -485,7 +485,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset, obd_free_diskmd(mds->mds_osc_exp, &lmm); out_oa: oti_free_cookies(&oti); - obdo_free(oinfo.oi_oa); + OBDO_FREE(oinfo.oi_oa); out_ids: if (rc) { OBD_FREE(*ids, mds->mds_lov_desc.ld_tgt_count * sizeof(**ids)); diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 481059d..e2ec61d 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -438,7 +438,7 @@ int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode, RETURN(0); /* first get memory EA */ - oinfo.oi_oa = obdo_alloc(); + OBDO_ALLOC(oinfo.oi_oa); if (!oinfo.oi_oa) RETURN(-ENOMEM); @@ -478,7 +478,7 @@ int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode, out: if (oinfo.oi_md) obd_free_memmd(mds->mds_osc_exp, &oinfo.oi_md); - obdo_free(oinfo.oi_oa); + OBDO_FREE(oinfo.oi_oa); RETURN(rc); } diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c index 5de98b2..d768886 100644 --- a/lustre/mds/mds_unlink_open.c +++ b/lustre/mds/mds_unlink_open.c @@ -76,7 +76,7 @@ int mds_osc_destroy_orphan(struct obd_device *obd, if (rc) GOTO(out_free_memmd, rc); - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) GOTO(out_free_memmd, rc = -ENOMEM); oa->o_id = lsm->lsm_object_id; @@ -88,7 +88,7 @@ int mds_osc_destroy_orphan(struct obd_device *obd, oti.oti_logcookies = logcookies; } rc = obd_destroy(mds->mds_osc_exp, oa, lsm, &oti, obd->obd_self_export); - obdo_free(oa); + OBDO_FREE(oa); if (rc) CDEBUG(D_INODE, "destroy orphan objid 0x"LPX64" on ost error " "%d\n", lsm->lsm_object_id, rc); diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c index 53260c5..2899eb0 100644 --- a/lustre/obdclass/llog_lvfs.c +++ b/lustre/obdclass/llog_lvfs.c @@ -638,7 +638,7 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res, handle->lgh_id.lgl_ogen = handle->lgh_file->f_dentry->d_inode->i_generation; } else { - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) GOTO(cleanup, rc = -ENOMEM); @@ -668,7 +668,7 @@ static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res, handle->lgh_ctxt = ctxt; finish: if (oa) - obdo_free(oa); + OBDO_FREE(oa); RETURN(rc); cleanup: switch (cleanup_phase) { @@ -727,7 +727,7 @@ static int llog_lvfs_destroy(struct llog_handle *handle) RETURN(rc); } - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) RETURN(-ENOMEM); @@ -742,7 +742,7 @@ static int llog_lvfs_destroy(struct llog_handle *handle) rc = obd_destroy(handle->lgh_ctxt->loc_exp, oa, NULL, NULL, NULL); out: - obdo_free(oa); + OBDO_FREE(oa); RETURN(rc); } diff --git a/lustre/obdfilter/filter_log.c b/lustre/obdfilter/filter_log.c index 0ffa396..d61ff41 100644 --- a/lustre/obdfilter/filter_log.c +++ b/lustre/obdfilter/filter_log.c @@ -133,7 +133,7 @@ static int filter_recov_log_unlink_cb(struct llog_ctxt *ctxt, ENTRY; lur = (struct llog_unlink_rec *)rec; - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) RETURN(-ENOMEM); oa->o_valid |= OBD_MD_FLCOOKIE; @@ -143,7 +143,7 @@ static int filter_recov_log_unlink_cb(struct llog_ctxt *ctxt, oid = oa->o_id; rc = filter_destroy(exp, oa, NULL, NULL, NULL); - obdo_free(oa); + OBDO_FREE(oa); if (rc == -ENOENT) { CDEBUG(D_HA, "object already removed, send cookie\n"); llog_cancel(ctxt, NULL, 1, cookie, 0); @@ -171,7 +171,7 @@ static int filter_recov_log_setattr_cb(struct llog_ctxt *ctxt, ENTRY; lsr = (struct llog_setattr_rec *)rec; - oinfo.oi_oa = obdo_alloc(); + OBDO_ALLOC(oinfo.oi_oa); oinfo.oi_oa->o_valid |= (OBD_MD_FLID | OBD_MD_FLUID | OBD_MD_FLGID | OBD_MD_FLCOOKIE); @@ -183,7 +183,7 @@ static int filter_recov_log_setattr_cb(struct llog_ctxt *ctxt, oid = oinfo.oi_oa->o_id; rc = filter_setattr(exp, &oinfo, NULL); - obdo_free(oinfo.oi_oa); + OBDO_FREE(oinfo.oi_oa); if (rc == -ENOENT) { CDEBUG(D_HA, "object already removed, send cookie\n"); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index ceb0c69..8dcd394 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1512,7 +1512,7 @@ static int osc_brw(int cmd, struct obd_export *exp, struct obd_info *oinfo, *oinfo->oi_oa = *saved_oa; } else if (page_count > pages_per_brw) { /* save a copy of oa (brw will clobber it) */ - saved_oa = obdo_alloc(); + OBDO_ALLOC(saved_oa); if (saved_oa == NULL) GOTO(out, rc = -ENOMEM); *saved_oa = *oinfo->oi_oa; @@ -1532,7 +1532,7 @@ out: osc_release_ppga(orig, page_count_orig); if (saved_oa != NULL) - obdo_free(saved_oa); + OBDO_FREE(saved_oa); RETURN(rc); } @@ -1879,7 +1879,7 @@ static int brw_interpret_oap(struct ptlrpc_request *request, void *data, int rc) client_obd_list_unlock(&cli->cl_loi_list_lock); - obdo_free(aa->aa_oa); + OBDO_FREE(aa->aa_oa); osc_release_ppga(aa->aa_ppga, aa->aa_page_count); RETURN(rc); @@ -1905,7 +1905,7 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli, if (pga == NULL) RETURN(ERR_PTR(-ENOMEM)); - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) GOTO(out, req = ERR_PTR(-ENOMEM)); @@ -1950,7 +1950,7 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli, out: if (IS_ERR(req)) { if (oa) - obdo_free(oa); + OBDO_FREE(oa); if (pga) OBD_FREE(pga, sizeof(*pga) * page_count); } @@ -2402,7 +2402,7 @@ static int osc_queue_async_io(struct obd_export *exp, struct lov_stripe_md *lsm, struct obd_async_page_ops *ops; struct obdo *oa; - oa = obdo_alloc(); + OBDO_ALLOC(oa); if (oa == NULL) RETURN(-ENOMEM); @@ -2412,7 +2412,7 @@ static int osc_queue_async_io(struct obd_export *exp, struct lov_stripe_md *lsm, NO_QUOTA) rc = -EDQUOT; - obdo_free(oa); + OBDO_FREE(oa); if (rc) RETURN(rc); } -- 1.8.3.1