diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/obdclass/llog_obd.c')
-rw-r--r-- | drivers/staging/lustre/lustre/obdclass/llog_obd.c | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/llog_obd.c b/drivers/staging/lustre/lustre/obdclass/llog_obd.c index 7e2290796315..71817af75396 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_obd.c @@ -110,7 +110,6 @@ int llog_cleanup(const struct lu_env *env, struct llog_ctxt *ctxt) struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); struct obd_llog_group *olg; int rc, idx; - ENTRY; LASSERT(ctxt != NULL); LASSERT(ctxt != LP_POISON); @@ -139,7 +138,7 @@ int llog_cleanup(const struct lu_env *env, struct llog_ctxt *ctxt) l_wait_event(olg->olg_waitq, llog_group_ctxt_null(olg, idx), &lwi); - RETURN(rc); + return rc; } EXPORT_SYMBOL(llog_cleanup); @@ -149,16 +148,15 @@ int llog_setup(const struct lu_env *env, struct obd_device *obd, { struct llog_ctxt *ctxt; int rc = 0; - ENTRY; if (index < 0 || index >= LLOG_MAX_CTXTS) - RETURN(-EINVAL); + return -EINVAL; LASSERT(olg != NULL); ctxt = llog_new_ctxt(obd); if (!ctxt) - RETURN(-ENOMEM); + return -ENOMEM; ctxt->loc_obd = obd; ctxt->loc_olg = olg; @@ -189,7 +187,7 @@ int llog_setup(const struct lu_env *env, struct obd_device *obd, } rc = 0; } - RETURN(rc); + return rc; } if (op->lop_setup) { @@ -210,22 +208,21 @@ int llog_setup(const struct lu_env *env, struct obd_device *obd, ctxt->loc_flags &= ~LLOG_CTXT_FLAG_UNINITIALIZED; } - RETURN(rc); + return rc; } EXPORT_SYMBOL(llog_setup); int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp, int flags) { int rc = 0; - ENTRY; if (!ctxt) - RETURN(0); + return 0; if (CTXTP(ctxt, sync)) rc = CTXTP(ctxt, sync)(ctxt, exp, flags); - RETURN(rc); + return rc; } EXPORT_SYMBOL(llog_sync); @@ -234,15 +231,14 @@ int llog_obd_add(const struct lu_env *env, struct llog_ctxt *ctxt, struct llog_cookie *logcookies, int numcookies) { int raised, rc; - ENTRY; if (!ctxt) { CERROR("No ctxt\n"); - RETURN(-ENODEV); + return -ENODEV; } if (ctxt->loc_flags & LLOG_CTXT_FLAG_UNINITIALIZED) - RETURN(-ENXIO); + return -ENXIO; CTXT_CHECK_OP(ctxt, obd_add, -EOPNOTSUPP); raised = cfs_cap_raised(CFS_CAP_SYS_RESOURCE); @@ -252,7 +248,7 @@ int llog_obd_add(const struct lu_env *env, struct llog_ctxt *ctxt, numcookies); if (!raised) cfs_cap_lower(CFS_CAP_SYS_RESOURCE); - RETURN(rc); + return rc; } EXPORT_SYMBOL(llog_obd_add); @@ -261,16 +257,15 @@ int llog_cancel(const struct lu_env *env, struct llog_ctxt *ctxt, struct llog_cookie *cookies, int flags) { int rc; - ENTRY; if (!ctxt) { CERROR("No ctxt\n"); - RETURN(-ENODEV); + return -ENODEV; } CTXT_CHECK_OP(ctxt, cancel, -EOPNOTSUPP); rc = CTXTP(ctxt, cancel)(env, ctxt, lsm, count, cookies, flags); - RETURN(rc); + return rc; } EXPORT_SYMBOL(llog_cancel); @@ -278,24 +273,24 @@ int obd_llog_init(struct obd_device *obd, struct obd_llog_group *olg, struct obd_device *disk_obd, int *index) { int rc; - ENTRY; + OBD_CHECK_DT_OP(obd, llog_init, 0); OBD_COUNTER_INCREMENT(obd, llog_init); rc = OBP(obd, llog_init)(obd, olg, disk_obd, index); - RETURN(rc); + return rc; } EXPORT_SYMBOL(obd_llog_init); int obd_llog_finish(struct obd_device *obd, int count) { int rc; - ENTRY; + OBD_CHECK_DT_OP(obd, llog_finish, 0); OBD_COUNTER_INCREMENT(obd, llog_finish); rc = OBP(obd, llog_finish)(obd, count); - RETURN(rc); + return rc; } EXPORT_SYMBOL(obd_llog_finish); |