aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/include/obd_class.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/include/obd_class.h')
-rw-r--r--drivers/staging/lustre/lustre/include/obd_class.h392
1 files changed, 151 insertions, 241 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h
index de5c5853647f..983718fe1e55 100644
--- a/drivers/staging/lustre/lustre/include/obd_class.h
+++ b/drivers/staging/lustre/lustre/include/obd_class.h
@@ -326,7 +326,7 @@ void obdo_le_to_cpu(struct obdo *dobdo, struct obdo *sobdo);
do { \
if (!(obd)) { \
CERROR("NULL device\n"); \
- RETURN(-ENODEV); \
+ return -ENODEV; \
} \
} while (0)
@@ -337,7 +337,7 @@ do { \
if (!(obd)->obd_set_up || (obd)->obd_stopping) { \
CERROR("Device %d not setup\n", \
(obd)->obd_minor); \
- RETURN(-ENODEV); \
+ return -ENODEV; \
} \
} while (0)
@@ -424,7 +424,7 @@ do { \
if (err) \
CERROR("md_" #op ": dev %s/%d no operation\n", \
obd->obd_name, obd->obd_minor); \
- RETURN(err); \
+ return err; \
} \
} while (0)
@@ -432,17 +432,17 @@ do { \
do { \
if ((exp) == NULL) { \
CERROR("obd_" #op ": NULL export\n"); \
- RETURN(-ENODEV); \
+ return -ENODEV; \
} \
if ((exp)->exp_obd == NULL || !OBT((exp)->exp_obd)) { \
CERROR("obd_" #op ": cleaned up obd\n"); \
- RETURN(-EOPNOTSUPP); \
+ return -EOPNOTSUPP; \
} \
if (!OBT((exp)->exp_obd) || !MDP((exp)->exp_obd, op)) { \
CERROR("obd_" #op ": dev %s/%d no operation\n", \
(exp)->exp_obd->obd_name, \
(exp)->exp_obd->obd_minor); \
- RETURN(-EOPNOTSUPP); \
+ return -EOPNOTSUPP; \
} \
} while (0)
@@ -453,7 +453,7 @@ do { \
if (err) \
CERROR("obd_" #op ": dev %d no operation\n", \
obd->obd_minor); \
- RETURN(err); \
+ return err; \
} \
} while (0)
@@ -461,16 +461,16 @@ do { \
do { \
if ((exp) == NULL) { \
CERROR("obd_" #op ": NULL export\n"); \
- RETURN(-ENODEV); \
+ return -ENODEV; \
} \
if ((exp)->exp_obd == NULL || !OBT((exp)->exp_obd)) { \
CERROR("obd_" #op ": cleaned up obd\n"); \
- RETURN(-EOPNOTSUPP); \
+ return -EOPNOTSUPP; \
} \
if (!OBT((exp)->exp_obd) || !OBP((exp)->exp_obd, op)) { \
CERROR("obd_" #op ": dev %d no operation\n", \
(exp)->exp_obd->obd_minor); \
- RETURN(-EOPNOTSUPP); \
+ return -EOPNOTSUPP; \
} \
} while (0)
@@ -480,7 +480,7 @@ do { \
if (err) \
CERROR("lop_" #op ": dev %d no operation\n", \
ctxt->loc_obd->obd_minor); \
- RETURN(err); \
+ return err; \
} \
} while (0)
@@ -495,14 +495,13 @@ static inline int obd_get_info(const struct lu_env *env,
struct lov_stripe_md *lsm)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, get_info);
EXP_COUNTER_INCREMENT(exp, get_info);
rc = OBP(exp->exp_obd, get_info)(env, exp, keylen, key, vallen, val,
lsm);
- RETURN(rc);
+ return rc;
}
static inline int obd_set_info_async(const struct lu_env *env,
@@ -511,14 +510,13 @@ static inline int obd_set_info_async(const struct lu_env *env,
struct ptlrpc_request_set *set)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, set_info_async);
EXP_COUNTER_INCREMENT(exp, set_info_async);
rc = OBP(exp->exp_obd, set_info_async)(env, exp, keylen, key, vallen,
val, set);
- RETURN(rc);
+ return rc;
}
/*
@@ -547,7 +545,6 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg)
{
int rc;
DECLARE_LU_VARS(ldt, d);
- ENTRY;
ldt = obd->obd_type->typ_lu;
if (ldt != NULL) {
@@ -577,7 +574,7 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg)
OBD_COUNTER_INCREMENT(obd, setup);
rc = OBP(obd, setup)(obd, cfg);
}
- RETURN(rc);
+ return rc;
}
static inline int obd_precleanup(struct obd_device *obd,
@@ -585,7 +582,6 @@ static inline int obd_precleanup(struct obd_device *obd,
{
int rc;
DECLARE_LU_VARS(ldt, d);
- ENTRY;
OBD_CHECK_DEV(obd);
ldt = obd->obd_type->typ_lu;
@@ -605,14 +601,13 @@ static inline int obd_precleanup(struct obd_device *obd,
OBD_COUNTER_INCREMENT(obd, precleanup);
rc = OBP(obd, precleanup)(obd, cleanup_stage);
- RETURN(rc);
+ return rc;
}
static inline int obd_cleanup(struct obd_device *obd)
{
int rc;
DECLARE_LU_VARS(ldt, d);
- ENTRY;
OBD_CHECK_DEV(obd);
@@ -632,13 +627,11 @@ static inline int obd_cleanup(struct obd_device *obd)
OBD_COUNTER_INCREMENT(obd, cleanup);
rc = OBP(obd, cleanup)(obd);
- RETURN(rc);
+ return rc;
}
static inline void obd_cleanup_client_import(struct obd_device *obd)
{
- ENTRY;
-
/* If we set up but never connected, the
client import will not have been cleaned. */
down_write(&obd->u.cli.cl_sem);
@@ -656,8 +649,6 @@ static inline void obd_cleanup_client_import(struct obd_device *obd)
obd->u.cli.cl_import = NULL;
}
up_write(&obd->u.cli.cl_sem);
-
- EXIT;
}
static inline int
@@ -665,7 +656,6 @@ obd_process_config(struct obd_device *obd, int datalen, void *data)
{
int rc;
DECLARE_LU_VARS(ldt, d);
- ENTRY;
OBD_CHECK_DEV(obd);
@@ -687,7 +677,7 @@ obd_process_config(struct obd_device *obd, int datalen, void *data)
OBD_COUNTER_INCREMENT(obd, process_config);
obd->obd_process_conf = 0;
- RETURN(rc);
+ return rc;
}
/* Pack an in-memory MD struct for storage on disk.
@@ -702,13 +692,12 @@ static inline int obd_packmd(struct obd_export *exp,
struct lov_stripe_md *mem_src)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, packmd);
EXP_COUNTER_INCREMENT(exp, packmd);
rc = OBP(exp->exp_obd, packmd)(exp, disk_tgt, mem_src);
- RETURN(rc);
+ return rc;
}
static inline int obd_size_diskmd(struct obd_export *exp,
@@ -757,13 +746,12 @@ static inline int obd_unpackmd(struct obd_export *exp,
int disk_len)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, unpackmd);
EXP_COUNTER_INCREMENT(exp, unpackmd);
rc = OBP(exp->exp_obd, unpackmd)(exp, mem_tgt, disk_src, disk_len);
- RETURN(rc);
+ return rc;
}
/* helper functions */
@@ -790,13 +778,12 @@ static inline int obd_free_memmd(struct obd_export *exp,
static inline int obd_precreate(struct obd_export *exp)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, precreate);
OBD_COUNTER_INCREMENT(exp->exp_obd, precreate);
rc = OBP(exp->exp_obd, precreate)(exp);
- RETURN(rc);
+ return rc;
}
static inline int obd_create_async(struct obd_export *exp,
@@ -805,13 +792,12 @@ static inline int obd_create_async(struct obd_export *exp,
struct obd_trans_info *oti)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, create_async);
EXP_COUNTER_INCREMENT(exp, create_async);
rc = OBP(exp->exp_obd, create_async)(exp, oinfo, ea, oti);
- RETURN(rc);
+ return rc;
}
static inline int obd_create(const struct lu_env *env, struct obd_export *exp,
@@ -819,13 +805,12 @@ static inline int obd_create(const struct lu_env *env, struct obd_export *exp,
struct obd_trans_info *oti)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, create);
EXP_COUNTER_INCREMENT(exp, create);
rc = OBP(exp->exp_obd, create)(env, exp, obdo, ea, oti);
- RETURN(rc);
+ return rc;
}
static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
@@ -834,26 +819,24 @@ static inline int obd_destroy(const struct lu_env *env, struct obd_export *exp,
struct obd_export *md_exp, void *capa)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, destroy);
EXP_COUNTER_INCREMENT(exp, destroy);
rc = OBP(exp->exp_obd, destroy)(env, exp, obdo, ea, oti, md_exp, capa);
- RETURN(rc);
+ return rc;
}
static inline int obd_getattr(const struct lu_env *env, struct obd_export *exp,
struct obd_info *oinfo)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, getattr);
EXP_COUNTER_INCREMENT(exp, getattr);
rc = OBP(exp->exp_obd, getattr)(env, exp, oinfo);
- RETURN(rc);
+ return rc;
}
static inline int obd_getattr_async(struct obd_export *exp,
@@ -861,13 +844,12 @@ static inline int obd_getattr_async(struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, getattr_async);
EXP_COUNTER_INCREMENT(exp, getattr_async);
rc = OBP(exp->exp_obd, getattr_async)(exp, oinfo, set);
- RETURN(rc);
+ return rc;
}
static inline int obd_setattr(const struct lu_env *env, struct obd_export *exp,
@@ -875,13 +857,12 @@ static inline int obd_setattr(const struct lu_env *env, struct obd_export *exp,
struct obd_trans_info *oti)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, setattr);
EXP_COUNTER_INCREMENT(exp, setattr);
rc = OBP(exp->exp_obd, setattr)(env, exp, oinfo, oti);
- RETURN(rc);
+ return rc;
}
/* This performs all the requests set init/wait/destroy actions. */
@@ -891,20 +872,19 @@ static inline int obd_setattr_rqset(struct obd_export *exp,
{
struct ptlrpc_request_set *set = NULL;
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, setattr_async);
EXP_COUNTER_INCREMENT(exp, setattr_async);
set = ptlrpc_prep_set();
if (set == NULL)
- RETURN(-ENOMEM);
+ return -ENOMEM;
rc = OBP(exp->exp_obd, setattr_async)(exp, oinfo, oti, set);
if (rc == 0)
rc = ptlrpc_set_wait(set);
ptlrpc_set_destroy(set);
- RETURN(rc);
+ return rc;
}
/* This adds all the requests into @set if @set != NULL, otherwise
@@ -915,13 +895,12 @@ static inline int obd_setattr_async(struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, setattr_async);
EXP_COUNTER_INCREMENT(exp, setattr_async);
rc = OBP(exp->exp_obd, setattr_async)(exp, oinfo, oti, set);
- RETURN(rc);
+ return rc;
}
static inline int obd_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
@@ -929,40 +908,37 @@ static inline int obd_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
{
struct obd_device *obd = imp->imp_obd;
int rc;
- ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, add_conn, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, add_conn);
rc = OBP(obd, add_conn)(imp, uuid, priority);
- RETURN(rc);
+ return rc;
}
static inline int obd_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
{
struct obd_device *obd = imp->imp_obd;
int rc;
- ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, del_conn, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, del_conn);
rc = OBP(obd, del_conn)(imp, uuid);
- RETURN(rc);
+ return rc;
}
static inline struct obd_uuid *obd_get_uuid(struct obd_export *exp)
{
struct obd_uuid *uuid;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, get_uuid, NULL);
EXP_COUNTER_INCREMENT(exp, get_uuid);
uuid = OBP(exp->exp_obd, get_uuid)(exp);
- RETURN(uuid);
+ return uuid;
}
/** Create a new /a exp on device /a obd for the uuid /a cluuid
@@ -979,7 +955,6 @@ static inline int obd_connect(const struct lu_env *env,
int rc;
__u64 ocf = data ? data->ocd_connect_flags : 0; /* for post-condition
* check */
- ENTRY;
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, connect, -EOPNOTSUPP);
@@ -989,7 +964,7 @@ static inline int obd_connect(const struct lu_env *env,
/* check that only subset is granted */
LASSERT(ergo(data != NULL, (data->ocd_connect_flags & ocf) ==
data->ocd_connect_flags));
- RETURN(rc);
+ return rc;
}
static inline int obd_reconnect(const struct lu_env *env,
@@ -1003,8 +978,6 @@ static inline int obd_reconnect(const struct lu_env *env,
__u64 ocf = d ? d->ocd_connect_flags : 0; /* for post-condition
* check */
- ENTRY;
-
OBD_CHECK_DEV_ACTIVE(obd);
OBD_CHECK_DT_OP(obd, reconnect, 0);
OBD_COUNTER_INCREMENT(obd, reconnect);
@@ -1013,44 +986,41 @@ static inline int obd_reconnect(const struct lu_env *env,
/* check that only subset is granted */
LASSERT(ergo(d != NULL,
(d->ocd_connect_flags & ocf) == d->ocd_connect_flags));
- RETURN(rc);
+ return rc;
}
static inline int obd_disconnect(struct obd_export *exp)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, disconnect);
EXP_COUNTER_INCREMENT(exp, disconnect);
rc = OBP(exp->exp_obd, disconnect)(exp);
- RETURN(rc);
+ return rc;
}
static inline int obd_fid_init(struct obd_device *obd, struct obd_export *exp,
enum lu_cli_type type)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(obd, fid_init, 0);
OBD_COUNTER_INCREMENT(obd, fid_init);
rc = OBP(obd, fid_init)(obd, exp, type);
- RETURN(rc);
+ return rc;
}
static inline int obd_fid_fini(struct obd_device *obd)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(obd, fid_fini, 0);
OBD_COUNTER_INCREMENT(obd, fid_fini);
rc = OBP(obd, fid_fini)(obd);
- RETURN(rc);
+ return rc;
}
static inline int obd_fid_alloc(struct obd_export *exp,
@@ -1058,113 +1028,101 @@ static inline int obd_fid_alloc(struct obd_export *exp,
struct md_op_data *op_data)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, fid_alloc);
EXP_COUNTER_INCREMENT(exp, fid_alloc);
rc = OBP(exp->exp_obd, fid_alloc)(exp, fid, op_data);
- RETURN(rc);
+ return rc;
}
static inline int obd_ping(const struct lu_env *env, struct obd_export *exp)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, ping, 0);
EXP_COUNTER_INCREMENT(exp, ping);
rc = OBP(exp->exp_obd, ping)(env, exp);
- RETURN(rc);
+ return rc;
}
static inline int obd_pool_new(struct obd_device *obd, char *poolname)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(obd, pool_new, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_new);
rc = OBP(obd, pool_new)(obd, poolname);
- RETURN(rc);
+ return rc;
}
static inline int obd_pool_del(struct obd_device *obd, char *poolname)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(obd, pool_del, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_del);
rc = OBP(obd, pool_del)(obd, poolname);
- RETURN(rc);
+ return rc;
}
static inline int obd_pool_add(struct obd_device *obd, char *poolname, char *ostname)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(obd, pool_add, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_add);
rc = OBP(obd, pool_add)(obd, poolname, ostname);
- RETURN(rc);
+ return rc;
}
static inline int obd_pool_rem(struct obd_device *obd, char *poolname, char *ostname)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(obd, pool_rem, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, pool_rem);
rc = OBP(obd, pool_rem)(obd, poolname, ostname);
- RETURN(rc);
+ return rc;
}
static inline void obd_getref(struct obd_device *obd)
{
- ENTRY;
if (OBT(obd) && OBP(obd, getref)) {
OBD_COUNTER_INCREMENT(obd, getref);
OBP(obd, getref)(obd);
}
- EXIT;
}
static inline void obd_putref(struct obd_device *obd)
{
- ENTRY;
if (OBT(obd) && OBP(obd, putref)) {
OBD_COUNTER_INCREMENT(obd, putref);
OBP(obd, putref)(obd);
}
- EXIT;
}
static inline int obd_init_export(struct obd_export *exp)
{
int rc = 0;
- ENTRY;
if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) &&
OBP((exp)->exp_obd, init_export))
rc = OBP(exp->exp_obd, init_export)(exp);
- RETURN(rc);
+ return rc;
}
static inline int obd_destroy_export(struct obd_export *exp)
{
- ENTRY;
if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) &&
OBP((exp)->exp_obd, destroy_export))
OBP(exp->exp_obd, destroy_export)(exp);
- RETURN(0);
+ return 0;
}
static inline int obd_extent_calc(struct obd_export *exp,
@@ -1172,10 +1130,10 @@ static inline int obd_extent_calc(struct obd_export *exp,
int cmd, obd_off *offset)
{
int rc;
- ENTRY;
+
EXP_CHECK_DT_OP(exp, extent_calc);
rc = OBP(exp->exp_obd, extent_calc)(exp, md, cmd, offset);
- RETURN(rc);
+ return rc;
}
static inline struct dentry *
@@ -1198,10 +1156,9 @@ static inline int obd_statfs_async(struct obd_export *exp,
{
int rc = 0;
struct obd_device *obd;
- ENTRY;
if (exp == NULL || exp->exp_obd == NULL)
- RETURN(-EINVAL);
+ return -EINVAL;
obd = exp->exp_obd;
OBD_CHECK_DT_OP(obd, statfs, -EOPNOTSUPP);
@@ -1224,7 +1181,7 @@ static inline int obd_statfs_async(struct obd_export *exp,
if (oinfo->oi_cb_up)
oinfo->oi_cb_up(oinfo, 0);
}
- RETURN(rc);
+ return rc;
}
static inline int obd_statfs_rqset(struct obd_export *exp,
@@ -1234,11 +1191,10 @@ static inline int obd_statfs_rqset(struct obd_export *exp,
struct ptlrpc_request_set *set = NULL;
struct obd_info oinfo = { { { 0 } } };
int rc = 0;
- ENTRY;
set = ptlrpc_prep_set();
if (set == NULL)
- RETURN(-ENOMEM);
+ return -ENOMEM;
oinfo.oi_osfs = osfs;
oinfo.oi_flags = flags;
@@ -1246,7 +1202,7 @@ static inline int obd_statfs_rqset(struct obd_export *exp,
if (rc == 0)
rc = ptlrpc_set_wait(set);
ptlrpc_set_destroy(set);
- RETURN(rc);
+ return rc;
}
/* @max_age is the oldest time in jiffies that we accept using a cached data.
@@ -1258,10 +1214,9 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp,
{
int rc = 0;
struct obd_device *obd = exp->exp_obd;
- ENTRY;
if (obd == NULL)
- RETURN(-EINVAL);
+ return -EINVAL;
OBD_CHECK_DT_OP(obd, statfs, -EOPNOTSUPP);
OBD_COUNTER_INCREMENT(obd, statfs);
@@ -1286,7 +1241,7 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp,
memcpy(osfs, &obd->obd_osfs, sizeof(*osfs));
spin_unlock(&obd->obd_osfs_lock);
}
- RETURN(rc);
+ return rc;
}
static inline int obd_sync_rqset(struct obd_export *exp, struct obd_info *oinfo,
@@ -1294,20 +1249,19 @@ static inline int obd_sync_rqset(struct obd_export *exp, struct obd_info *oinfo,
{
struct ptlrpc_request_set *set = NULL;
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, sync, -EOPNOTSUPP);
EXP_COUNTER_INCREMENT(exp, sync);
set = ptlrpc_prep_set();
if (set == NULL)
- RETURN(-ENOMEM);
+ return -ENOMEM;
rc = OBP(exp->exp_obd, sync)(NULL, exp, oinfo, start, end, set);
if (rc == 0)
rc = ptlrpc_set_wait(set);
ptlrpc_set_destroy(set);
- RETURN(rc);
+ return rc;
}
static inline int obd_sync(const struct lu_env *env, struct obd_export *exp,
@@ -1315,13 +1269,12 @@ static inline int obd_sync(const struct lu_env *env, struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, sync, -EOPNOTSUPP);
EXP_COUNTER_INCREMENT(exp, sync);
rc = OBP(exp->exp_obd, sync)(env, exp, oinfo, start, end, set);
- RETURN(rc);
+ return rc;
}
static inline int obd_punch_rqset(struct obd_export *exp,
@@ -1330,20 +1283,19 @@ static inline int obd_punch_rqset(struct obd_export *exp,
{
struct ptlrpc_request_set *set = NULL;
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, punch);
EXP_COUNTER_INCREMENT(exp, punch);
set = ptlrpc_prep_set();
if (set == NULL)
- RETURN(-ENOMEM);
+ return -ENOMEM;
rc = OBP(exp->exp_obd, punch)(NULL, exp, oinfo, oti, set);
if (rc == 0)
rc = ptlrpc_set_wait(set);
ptlrpc_set_destroy(set);
- RETURN(rc);
+ return rc;
}
static inline int obd_punch(const struct lu_env *env, struct obd_export *exp,
@@ -1351,13 +1303,12 @@ static inline int obd_punch(const struct lu_env *env, struct obd_export *exp,
struct ptlrpc_request_set *rqset)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, punch);
EXP_COUNTER_INCREMENT(exp, punch);
rc = OBP(exp->exp_obd, punch)(env, exp, oinfo, oti, rqset);
- RETURN(rc);
+ return rc;
}
static inline int obd_brw(int cmd, struct obd_export *exp,
@@ -1365,7 +1316,6 @@ static inline int obd_brw(int cmd, struct obd_export *exp,
struct brw_page *pg, struct obd_trans_info *oti)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, brw);
EXP_COUNTER_INCREMENT(exp, brw);
@@ -1377,7 +1327,7 @@ static inline int obd_brw(int cmd, struct obd_export *exp,
}
rc = OBP(exp->exp_obd, brw)(cmd, exp, oinfo, oa_bufs, pg, oti);
- RETURN(rc);
+ return rc;
}
static inline int obd_preprw(const struct lu_env *env, int cmd,
@@ -1389,14 +1339,13 @@ static inline int obd_preprw(const struct lu_env *env, int cmd,
struct lustre_capa *capa)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, preprw);
EXP_COUNTER_INCREMENT(exp, preprw);
rc = OBP(exp->exp_obd, preprw)(env, cmd, exp, oa, objcount, obj, remote,
pages, local, oti, capa);
- RETURN(rc);
+ return rc;
}
static inline int obd_commitrw(const struct lu_env *env, int cmd,
@@ -1406,14 +1355,12 @@ static inline int obd_commitrw(const struct lu_env *env, int cmd,
struct niobuf_local *local,
struct obd_trans_info *oti, int rc)
{
- ENTRY;
-
EXP_CHECK_DT_OP(exp, commitrw);
EXP_COUNTER_INCREMENT(exp, commitrw);
rc = OBP(exp->exp_obd, commitrw)(env, cmd, exp, oa, objcount, obj,
rnb, pages, local, oti, rc);
- RETURN(rc);
+ return rc;
}
static inline int obd_merge_lvb(struct obd_export *exp,
@@ -1421,13 +1368,12 @@ static inline int obd_merge_lvb(struct obd_export *exp,
struct ost_lvb *lvb, int kms_only)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, merge_lvb);
EXP_COUNTER_INCREMENT(exp, merge_lvb);
rc = OBP(exp->exp_obd, merge_lvb)(exp, lsm, lvb, kms_only);
- RETURN(rc);
+ return rc;
}
static inline int obd_adjust_kms(struct obd_export *exp,
@@ -1435,26 +1381,24 @@ static inline int obd_adjust_kms(struct obd_export *exp,
int shrink)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, adjust_kms);
EXP_COUNTER_INCREMENT(exp, adjust_kms);
rc = OBP(exp->exp_obd, adjust_kms)(exp, lsm, size, shrink);
- RETURN(rc);
+ return rc;
}
static inline int obd_iocontrol(unsigned int cmd, struct obd_export *exp,
int len, void *karg, void *uarg)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, iocontrol);
EXP_COUNTER_INCREMENT(exp, iocontrol);
rc = OBP(exp->exp_obd, iocontrol)(cmd, exp, len, karg, uarg);
- RETURN(rc);
+ return rc;
}
static inline int obd_enqueue_rqset(struct obd_export *exp,
@@ -1463,20 +1407,19 @@ static inline int obd_enqueue_rqset(struct obd_export *exp,
{
struct ptlrpc_request_set *set = NULL;
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, enqueue);
EXP_COUNTER_INCREMENT(exp, enqueue);
set = ptlrpc_prep_set();
if (set == NULL)
- RETURN(-ENOMEM);
+ return -ENOMEM;
rc = OBP(exp->exp_obd, enqueue)(exp, oinfo, einfo, set);
if (rc == 0)
rc = ptlrpc_set_wait(set);
ptlrpc_set_destroy(set);
- RETURN(rc);
+ return rc;
}
static inline int obd_enqueue(struct obd_export *exp,
@@ -1485,13 +1428,12 @@ static inline int obd_enqueue(struct obd_export *exp,
struct ptlrpc_request_set *set)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, enqueue);
EXP_COUNTER_INCREMENT(exp, enqueue);
rc = OBP(exp->exp_obd, enqueue)(exp, oinfo, einfo, set);
- RETURN(rc);
+ return rc;
}
static inline int obd_change_cbdata(struct obd_export *exp,
@@ -1499,13 +1441,12 @@ static inline int obd_change_cbdata(struct obd_export *exp,
ldlm_iterator_t it, void *data)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, change_cbdata);
EXP_COUNTER_INCREMENT(exp, change_cbdata);
rc = OBP(exp->exp_obd, change_cbdata)(exp, lsm, it, data);
- RETURN(rc);
+ return rc;
}
static inline int obd_find_cbdata(struct obd_export *exp,
@@ -1513,13 +1454,12 @@ static inline int obd_find_cbdata(struct obd_export *exp,
ldlm_iterator_t it, void *data)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, find_cbdata);
EXP_COUNTER_INCREMENT(exp, find_cbdata);
rc = OBP(exp->exp_obd, find_cbdata)(exp, lsm, it, data);
- RETURN(rc);
+ return rc;
}
static inline int obd_cancel(struct obd_export *exp,
@@ -1527,13 +1467,12 @@ static inline int obd_cancel(struct obd_export *exp,
struct lustre_handle *lockh)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, cancel);
EXP_COUNTER_INCREMENT(exp, cancel);
rc = OBP(exp->exp_obd, cancel)(exp, ea, mode, lockh);
- RETURN(rc);
+ return rc;
}
static inline int obd_cancel_unused(struct obd_export *exp,
@@ -1542,13 +1481,12 @@ static inline int obd_cancel_unused(struct obd_export *exp,
void *opaque)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, cancel_unused);
EXP_COUNTER_INCREMENT(exp, cancel_unused);
rc = OBP(exp->exp_obd, cancel_unused)(exp, ea, flags, opaque);
- RETURN(rc);
+ return rc;
}
static inline int obd_pin(struct obd_export *exp, const struct lu_fid *fid,
@@ -1556,26 +1494,24 @@ static inline int obd_pin(struct obd_export *exp, const struct lu_fid *fid,
int flag)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, pin);
EXP_COUNTER_INCREMENT(exp, pin);
rc = OBP(exp->exp_obd, pin)(exp, fid, oc, handle, flag);
- RETURN(rc);
+ return rc;
}
static inline int obd_unpin(struct obd_export *exp,
struct obd_client_handle *handle, int flag)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, unpin);
EXP_COUNTER_INCREMENT(exp, unpin);
rc = OBP(exp->exp_obd, unpin)(exp, handle, flag);
- RETURN(rc);
+ return rc;
}
@@ -1583,30 +1519,26 @@ static inline void obd_import_event(struct obd_device *obd,
struct obd_import *imp,
enum obd_import_event event)
{
- ENTRY;
if (!obd) {
CERROR("NULL device\n");
- EXIT;
return;
}
if (obd->obd_set_up && OBP(obd, import_event)) {
OBD_COUNTER_INCREMENT(obd, import_event);
OBP(obd, import_event)(obd, imp, event);
}
- EXIT;
}
static inline int obd_llog_connect(struct obd_export *exp,
struct llogd_conn_body *body)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, llog_connect, 0);
EXP_COUNTER_INCREMENT(exp, llog_connect);
rc = OBP(exp->exp_obd, llog_connect)(exp, body);
- RETURN(rc);
+ return rc;
}
@@ -1616,7 +1548,7 @@ static inline int obd_notify(struct obd_device *obd,
void *data)
{
int rc;
- ENTRY;
+
OBD_CHECK_DEV(obd);
/* the check for async_recov is a complete hack - I'm hereby
@@ -1625,17 +1557,17 @@ static inline int obd_notify(struct obd_device *obd,
by this point, and it needs to get them to execute mds_postrecov. */
if (!obd->obd_set_up && !obd->obd_async_recov) {
CDEBUG(D_HA, "obd %s not set up\n", obd->obd_name);
- RETURN(-EINVAL);
+ return -EINVAL;
}
if (!OBP(obd, notify)) {
CDEBUG(D_HA, "obd %s has no notify handler\n", obd->obd_name);
- RETURN(-ENOSYS);
+ return -ENOSYS;
}
OBD_COUNTER_INCREMENT(obd, notify);
rc = OBP(obd, notify)(obd, watched, ev, data);
- RETURN(rc);
+ return rc;
}
static inline int obd_notify_observer(struct obd_device *observer,
@@ -1669,26 +1601,24 @@ static inline int obd_quotacheck(struct obd_export *exp,
struct obd_quotactl *oqctl)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, quotacheck);
EXP_COUNTER_INCREMENT(exp, quotacheck);
rc = OBP(exp->exp_obd, quotacheck)(exp->exp_obd, exp, oqctl);
- RETURN(rc);
+ return rc;
}
static inline int obd_quotactl(struct obd_export *exp,
struct obd_quotactl *oqctl)
{
int rc;
- ENTRY;
EXP_CHECK_DT_OP(exp, quotactl);
EXP_COUNTER_INCREMENT(exp, quotactl);
rc = OBP(exp->exp_obd, quotactl)(exp->exp_obd, exp, oqctl);
- RETURN(rc);
+ return rc;
}
static inline int obd_health_check(const struct lu_env *env,
@@ -1702,56 +1632,52 @@ static inline int obd_health_check(const struct lu_env *env,
* <0 on error
*/
int rc;
- ENTRY;
/* don't use EXP_CHECK_DT_OP, because NULL method is normal here */
if (obd == NULL || !OBT(obd)) {
CERROR("cleaned up obd\n");
- RETURN(-EOPNOTSUPP);
+ return -EOPNOTSUPP;
}
if (!obd->obd_set_up || obd->obd_stopping)
- RETURN(0);
+ return 0;
if (!OBP(obd, health_check))
- RETURN(0);
+ return 0;
rc = OBP(obd, health_check)(env, obd);
- RETURN(rc);
+ return rc;
}
static inline int obd_register_observer(struct obd_device *obd,
struct obd_device *observer)
{
- ENTRY;
OBD_CHECK_DEV(obd);
down_write(&obd->obd_observer_link_sem);
if (obd->obd_observer && observer) {
up_write(&obd->obd_observer_link_sem);
- RETURN(-EALREADY);
+ return -EALREADY;
}
obd->obd_observer = observer;
up_write(&obd->obd_observer_link_sem);
- RETURN(0);
+ return 0;
}
static inline int obd_pin_observer(struct obd_device *obd,
struct obd_device **observer)
{
- ENTRY;
down_read(&obd->obd_observer_link_sem);
if (!obd->obd_observer) {
*observer = NULL;
up_read(&obd->obd_observer_link_sem);
- RETURN(-ENOENT);
+ return -ENOENT;
}
*observer = obd->obd_observer;
- RETURN(0);
+ return 0;
}
static inline int obd_unpin_observer(struct obd_device *obd)
{
- ENTRY;
up_read(&obd->obd_observer_link_sem);
- RETURN(0);
+ return 0;
}
#if 0
@@ -1760,52 +1686,48 @@ static inline int obd_register_page_removal_cb(struct obd_export *exp,
obd_pin_extent_cb pin_cb)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, register_page_removal_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, register_page_removal_cb);
rc = OBP(exp->exp_obd, register_page_removal_cb)(exp, cb, pin_cb);
- RETURN(rc);
+ return rc;
}
static inline int obd_unregister_page_removal_cb(struct obd_export *exp,
obd_page_removal_cb_t cb)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, unregister_page_removal_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_page_removal_cb);
rc = OBP(exp->exp_obd, unregister_page_removal_cb)(exp, cb);
- RETURN(rc);
+ return rc;
}
static inline int obd_register_lock_cancel_cb(struct obd_export *exp,
obd_lock_cancel_cb cb)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, register_lock_cancel_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, register_lock_cancel_cb);
rc = OBP(exp->exp_obd, register_lock_cancel_cb)(exp, cb);
- RETURN(rc);
+ return rc;
}
static inline int obd_unregister_lock_cancel_cb(struct obd_export *exp,
obd_lock_cancel_cb cb)
{
int rc;
- ENTRY;
OBD_CHECK_DT_OP(exp->exp_obd, unregister_lock_cancel_cb, 0);
OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_lock_cancel_cb);
rc = OBP(exp->exp_obd, unregister_lock_cancel_cb)(exp, cb);
- RETURN(rc);
+ return rc;
}
#endif
@@ -1814,34 +1736,33 @@ static inline int md_getstatus(struct obd_export *exp,
struct lu_fid *fid, struct obd_capa **pc)
{
int rc;
- ENTRY;
EXP_CHECK_MD_OP(exp, getstatus);
EXP_MD_COUNTER_INCREMENT(exp, getstatus);
rc = MDP(exp->exp_obd, getstatus)(exp, fid, pc);
- RETURN(rc);
+ return rc;
}
static inline int md_getattr(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, getattr);
EXP_MD_COUNTER_INCREMENT(exp, getattr);
rc = MDP(exp->exp_obd, getattr)(exp, op_data, request);
- RETURN(rc);
+ return rc;
}
static inline int md_null_inode(struct obd_export *exp,
const struct lu_fid *fid)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, null_inode);
EXP_MD_COUNTER_INCREMENT(exp, null_inode);
rc = MDP(exp->exp_obd, null_inode)(exp, fid);
- RETURN(rc);
+ return rc;
}
static inline int md_find_cbdata(struct obd_export *exp,
@@ -1849,11 +1770,11 @@ static inline int md_find_cbdata(struct obd_export *exp,
ldlm_iterator_t it, void *data)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, find_cbdata);
EXP_MD_COUNTER_INCREMENT(exp, find_cbdata);
rc = MDP(exp->exp_obd, find_cbdata)(exp, fid, it, data);
- RETURN(rc);
+ return rc;
}
static inline int md_close(struct obd_export *exp, struct md_op_data *op_data,
@@ -1861,11 +1782,11 @@ static inline int md_close(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, close);
EXP_MD_COUNTER_INCREMENT(exp, close);
rc = MDP(exp->exp_obd, close)(exp, op_data, mod, request);
- RETURN(rc);
+ return rc;
}
static inline int md_create(struct obd_export *exp, struct md_op_data *op_data,
@@ -1874,12 +1795,12 @@ static inline int md_create(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, create);
EXP_MD_COUNTER_INCREMENT(exp, create);
rc = MDP(exp->exp_obd, create)(exp, op_data, data, datalen, mode,
uid, gid, cap_effective, rdev, request);
- RETURN(rc);
+ return rc;
}
static inline int md_done_writing(struct obd_export *exp,
@@ -1887,11 +1808,11 @@ static inline int md_done_writing(struct obd_export *exp,
struct md_open_data *mod)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, done_writing);
EXP_MD_COUNTER_INCREMENT(exp, done_writing);
rc = MDP(exp->exp_obd, done_writing)(exp, op_data, mod);
- RETURN(rc);
+ return rc;
}
static inline int md_enqueue(struct obd_export *exp,
@@ -1904,12 +1825,12 @@ static inline int md_enqueue(struct obd_export *exp,
int extra_lock_flags)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, enqueue);
EXP_MD_COUNTER_INCREMENT(exp, enqueue);
rc = MDP(exp->exp_obd, enqueue)(exp, einfo, it, op_data, lockh,
lmm, lmmsize, req, extra_lock_flags);
- RETURN(rc);
+ return rc;
}
static inline int md_getattr_name(struct obd_export *exp,
@@ -1917,11 +1838,11 @@ static inline int md_getattr_name(struct obd_export *exp,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, getattr_name);
EXP_MD_COUNTER_INCREMENT(exp, getattr_name);
rc = MDP(exp->exp_obd, getattr_name)(exp, op_data, request);
- RETURN(rc);
+ return rc;
}
static inline int md_intent_lock(struct obd_export *exp,
@@ -1932,24 +1853,24 @@ static inline int md_intent_lock(struct obd_export *exp,
__u64 extra_lock_flags)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, intent_lock);
EXP_MD_COUNTER_INCREMENT(exp, intent_lock);
rc = MDP(exp->exp_obd, intent_lock)(exp, op_data, lmm, lmmsize,
it, lookup_flags, reqp, cb_blocking,
extra_lock_flags);
- RETURN(rc);
+ return rc;
}
static inline int md_link(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, link);
EXP_MD_COUNTER_INCREMENT(exp, link);
rc = MDP(exp->exp_obd, link)(exp, op_data, request);
- RETURN(rc);
+ return rc;
}
static inline int md_rename(struct obd_export *exp, struct md_op_data *op_data,
@@ -1957,12 +1878,12 @@ static inline int md_rename(struct obd_export *exp, struct md_op_data *op_data,
int newlen, struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, rename);
EXP_MD_COUNTER_INCREMENT(exp, rename);
rc = MDP(exp->exp_obd, rename)(exp, op_data, old, oldlen, new,
newlen, request);
- RETURN(rc);
+ return rc;
}
static inline int md_is_subdir(struct obd_export *exp,
@@ -1971,11 +1892,11 @@ static inline int md_is_subdir(struct obd_export *exp,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, is_subdir);
EXP_MD_COUNTER_INCREMENT(exp, is_subdir);
rc = MDP(exp->exp_obd, is_subdir)(exp, pfid, cfid, request);
- RETURN(rc);
+ return rc;
}
static inline int md_setattr(struct obd_export *exp, struct md_op_data *op_data,
@@ -1984,23 +1905,23 @@ static inline int md_setattr(struct obd_export *exp, struct md_op_data *op_data,
struct md_open_data **mod)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, setattr);
EXP_MD_COUNTER_INCREMENT(exp, setattr);
rc = MDP(exp->exp_obd, setattr)(exp, op_data, ea, ealen,
ea2, ea2len, request, mod);
- RETURN(rc);
+ return rc;
}
static inline int md_sync(struct obd_export *exp, const struct lu_fid *fid,
struct obd_capa *oc, struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, sync);
EXP_MD_COUNTER_INCREMENT(exp, sync);
rc = MDP(exp->exp_obd, sync)(exp, fid, oc, request);
- RETURN(rc);
+ return rc;
}
static inline int md_readpage(struct obd_export *exp, struct md_op_data *opdata,
@@ -2008,22 +1929,22 @@ static inline int md_readpage(struct obd_export *exp, struct md_op_data *opdata,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, readpage);
EXP_MD_COUNTER_INCREMENT(exp, readpage);
rc = MDP(exp->exp_obd, readpage)(exp, opdata, pages, request);
- RETURN(rc);
+ return rc;
}
static inline int md_unlink(struct obd_export *exp, struct md_op_data *op_data,
struct ptlrpc_request **request)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, unlink);
EXP_MD_COUNTER_INCREMENT(exp, unlink);
rc = MDP(exp->exp_obd, unlink)(exp, op_data, request);
- RETURN(rc);
+ return rc;
}
static inline int md_get_lustre_md(struct obd_export *exp,
@@ -2032,19 +1953,17 @@ static inline int md_get_lustre_md(struct obd_export *exp,
struct obd_export *md_exp,
struct lustre_md *md)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, get_lustre_md);
EXP_MD_COUNTER_INCREMENT(exp, get_lustre_md);
- RETURN(MDP(exp->exp_obd, get_lustre_md)(exp, req, dt_exp, md_exp, md));
+ return MDP(exp->exp_obd, get_lustre_md)(exp, req, dt_exp, md_exp, md);
}
static inline int md_free_lustre_md(struct obd_export *exp,
struct lustre_md *md)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, free_lustre_md);
EXP_MD_COUNTER_INCREMENT(exp, free_lustre_md);
- RETURN(MDP(exp->exp_obd, free_lustre_md)(exp, md));
+ return MDP(exp->exp_obd, free_lustre_md)(exp, md);
}
static inline int md_setxattr(struct obd_export *exp,
@@ -2054,12 +1973,11 @@ static inline int md_setxattr(struct obd_export *exp,
int output_size, int flags, __u32 suppgid,
struct ptlrpc_request **request)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, setxattr);
EXP_MD_COUNTER_INCREMENT(exp, setxattr);
- RETURN(MDP(exp->exp_obd, setxattr)(exp, fid, oc, valid, name, input,
+ return MDP(exp->exp_obd, setxattr)(exp, fid, oc, valid, name, input,
input_size, output_size, flags,
- suppgid, request));
+ suppgid, request);
}
static inline int md_getxattr(struct obd_export *exp,
@@ -2069,40 +1987,36 @@ static inline int md_getxattr(struct obd_export *exp,
int output_size, int flags,
struct ptlrpc_request **request)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, getxattr);
EXP_MD_COUNTER_INCREMENT(exp, getxattr);
- RETURN(MDP(exp->exp_obd, getxattr)(exp, fid, oc, valid, name, input,
+ return MDP(exp->exp_obd, getxattr)(exp, fid, oc, valid, name, input,
input_size, output_size, flags,
- request));
+ request);
}
static inline int md_set_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och,
struct ptlrpc_request *open_req)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, set_open_replay_data);
EXP_MD_COUNTER_INCREMENT(exp, set_open_replay_data);
- RETURN(MDP(exp->exp_obd, set_open_replay_data)(exp, och, open_req));
+ return MDP(exp->exp_obd, set_open_replay_data)(exp, och, open_req);
}
static inline int md_clear_open_replay_data(struct obd_export *exp,
struct obd_client_handle *och)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, clear_open_replay_data);
EXP_MD_COUNTER_INCREMENT(exp, clear_open_replay_data);
- RETURN(MDP(exp->exp_obd, clear_open_replay_data)(exp, och));
+ return MDP(exp->exp_obd, clear_open_replay_data)(exp, och);
}
static inline int md_set_lock_data(struct obd_export *exp,
__u64 *lockh, void *data, __u64 *bits)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, set_lock_data);
EXP_MD_COUNTER_INCREMENT(exp, set_lock_data);
- RETURN(MDP(exp->exp_obd, set_lock_data)(exp, lockh, data, bits));
+ return MDP(exp->exp_obd, set_lock_data)(exp, lockh, data, bits);
}
static inline int md_cancel_unused(struct obd_export *exp,
@@ -2113,14 +2027,13 @@ static inline int md_cancel_unused(struct obd_export *exp,
void *opaque)
{
int rc;
- ENTRY;
EXP_CHECK_MD_OP(exp, cancel_unused);
EXP_MD_COUNTER_INCREMENT(exp, cancel_unused);
rc = MDP(exp->exp_obd, cancel_unused)(exp, fid, policy, mode,
flags, opaque);
- RETURN(rc);
+ return rc;
}
static inline ldlm_mode_t md_lock_match(struct obd_export *exp, __u64 flags,
@@ -2130,21 +2043,19 @@ static inline ldlm_mode_t md_lock_match(struct obd_export *exp, __u64 flags,
ldlm_mode_t mode,
struct lustre_handle *lockh)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, lock_match);
EXP_MD_COUNTER_INCREMENT(exp, lock_match);
- RETURN(MDP(exp->exp_obd, lock_match)(exp, flags, fid, type,
- policy, mode, lockh));
+ return MDP(exp->exp_obd, lock_match)(exp, flags, fid, type,
+ policy, mode, lockh);
}
static inline int md_init_ea_size(struct obd_export *exp, int easize,
int def_asize, int cookiesize)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, init_ea_size);
EXP_MD_COUNTER_INCREMENT(exp, init_ea_size);
- RETURN(MDP(exp->exp_obd, init_ea_size)(exp, easize, def_asize,
- cookiesize));
+ return MDP(exp->exp_obd, init_ea_size)(exp, easize, def_asize,
+ cookiesize);
}
static inline int md_get_remote_perm(struct obd_export *exp,
@@ -2152,22 +2063,21 @@ static inline int md_get_remote_perm(struct obd_export *exp,
struct obd_capa *oc, __u32 suppgid,
struct ptlrpc_request **request)
{
- ENTRY;
EXP_CHECK_MD_OP(exp, get_remote_perm);
EXP_MD_COUNTER_INCREMENT(exp, get_remote_perm);
- RETURN(MDP(exp->exp_obd, get_remote_perm)(exp, fid, oc, suppgid,
- request));
+ return MDP(exp->exp_obd, get_remote_perm)(exp, fid, oc, suppgid,
+ request);
}
static inline int md_renew_capa(struct obd_export *exp, struct obd_capa *ocapa,
renew_capa_cb_t cb)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, renew_capa);
EXP_MD_COUNTER_INCREMENT(exp, renew_capa);
rc = MDP(exp->exp_obd, renew_capa)(exp, ocapa, cb);
- RETURN(rc);
+ return rc;
}
static inline int md_unpack_capa(struct obd_export *exp,
@@ -2176,11 +2086,11 @@ static inline int md_unpack_capa(struct obd_export *exp,
struct obd_capa **oc)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, unpack_capa);
EXP_MD_COUNTER_INCREMENT(exp, unpack_capa);
rc = MDP(exp->exp_obd, unpack_capa)(exp, req, field, oc);
- RETURN(rc);
+ return rc;
}
static inline int md_intent_getattr_async(struct obd_export *exp,
@@ -2188,11 +2098,11 @@ static inline int md_intent_getattr_async(struct obd_export *exp,
struct ldlm_enqueue_info *einfo)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, intent_getattr_async);
EXP_MD_COUNTER_INCREMENT(exp, intent_getattr_async);
rc = MDP(exp->exp_obd, intent_getattr_async)(exp, minfo, einfo);
- RETURN(rc);
+ return rc;
}
static inline int md_revalidate_lock(struct obd_export *exp,
@@ -2200,11 +2110,11 @@ static inline int md_revalidate_lock(struct obd_export *exp,
struct lu_fid *fid, __u64 *bits)
{
int rc;
- ENTRY;
+
EXP_CHECK_MD_OP(exp, revalidate_lock);
EXP_MD_COUNTER_INCREMENT(exp, revalidate_lock);
rc = MDP(exp->exp_obd, revalidate_lock)(exp, it, fid, bits);
- RETURN(rc);
+ return rc;
}