From af73f164d12b4d8d491f8357f3d1f52fa970bc4e Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 5 Apr 2006 19:05:12 +0000 Subject: [PATCH] add "inline" to make compiler happy --- lustre/cmm/cmm_device.c | 24 ++++++++++++------------ lustre/cmm/cmm_internal.h | 2 +- lustre/include/linux/md_object.h | 20 ++++++++++---------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lustre/cmm/cmm_device.c b/lustre/cmm/cmm_device.c index a99c0b2..64deb07 100644 --- a/lustre/cmm/cmm_device.c +++ b/lustre/cmm/cmm_device.c @@ -47,7 +47,7 @@ static struct obd_ops cmm_obd_device_ops = { static struct lu_device_operations cmm_lu_ops; -static int lu_device_is_cmm(struct lu_device *d) +static inline int lu_device_is_cmm(struct lu_device *d) { /* * XXX for now. Tags in lu_device_type->ldt_something are needed. @@ -114,7 +114,7 @@ int mds_md_connect(struct obd_device *obd, char *md_name) /* retrieve size of EA */ rc = obd_get_info(mds->mds_md_exp, strlen("mdsize"), "mdsize", &valsize, &value); - if (rc) + if (rc) GOTO(err_reg, rc); if (value > mds->mds_max_mdsize) @@ -123,9 +123,9 @@ int mds_md_connect(struct obd_device *obd, char *md_name) /* find our number in LMV cluster */ rc = obd_get_info(mds->mds_md_exp, strlen("mdsnum"), "mdsnum", &valsize, &value); - if (rc) + if (rc) GOTO(err_reg, rc); - + mds->mds_num = value; rc = obd_set_info(mds->mds_md_exp, strlen("inter_mds"), @@ -177,12 +177,12 @@ int mds_md_disconnect(struct obd_device *obd, int flags) if (flags & OBD_OPT_FORCE) { struct obd_device *lmv_obd; struct obd_ioctl_data ioc_data = { 0 }; - + lmv_obd = class_exp2obd(mds->mds_md_exp); if (lmv_obd == NULL) GOTO(out, rc = 0); - /* + /* * making disconnecting lmv stuff do not send anything * to all remote MDSs from LMV. This is needed to * prevent possible hanging with endless recovery, when @@ -226,7 +226,7 @@ static int cmm_init(struct cmm_device *m, lu_dev->ld_ops = &cmm_lu_ops; snprintf(ns_name, sizeof ns_name, LUSTRE_CMM0_NAME"-%p", m); - + return 0; } @@ -235,20 +235,20 @@ struct lu_device *cmm_device_alloc(struct lu_device_type *t, { struct lu_device *l; struct cmm_device *m; - + OBD_ALLOC_PTR(m); if (m == NULL) { l = ERR_PTR(-ENOMEM); } else { int err; - + err = cmm_init(m, t, cfg); - if (!err) + if (!err) l = cmm2lu_dev(m); - else + else l = ERR_PTR(err); } - + return l; } diff --git a/lustre/cmm/cmm_internal.h b/lustre/cmm/cmm_internal.h index 5b34e67..9a7690e 100644 --- a/lustre/cmm/cmm_internal.h +++ b/lustre/cmm/cmm_internal.h @@ -64,7 +64,7 @@ static inline struct cmm_device *cmm_obj2dev(struct cmm_object *c) return (md2cmm_dev(md_device_get(&c->cmo_obj))); } -static struct cmm_object *lu2cmm_obj(struct lu_object *o) +static inline struct cmm_object *lu2cmm_obj(struct lu_object *o) { //LASSERT(lu_device_is_cmm(o->lo_dev)); return container_of(o, struct cmm_object, cmo_obj.mo_lu); diff --git a/lustre/include/linux/md_object.h b/lustre/include/linux/md_object.h index 223763f..71c5b18 100644 --- a/lustre/include/linux/md_object.h +++ b/lustre/include/linux/md_object.h @@ -1,8 +1,8 @@ /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- * vim:expandtab:shiftwidth=8:tabstop=8: - * + * * Extention of lu_object.h for metadata objects - * + * * Copyright (C) 2006 Cluster File Systems, Inc. * * This file is part of Lustre, http://www.lustre.org. @@ -43,20 +43,20 @@ struct md_device_operations { int (*mdo_root_get)(struct md_device *m, struct lu_fid *f); int (*mdo_mkdir)(struct md_object *obj, const char *name, struct md_object *child); - + int (*mdo_rename)(struct md_object *spobj, struct md_object *tpobj, struct md_object *sobj, const char *sname, - struct md_object *tobj, const char *tname, + struct md_object *tobj, const char *tname, struct context *uctxt); int (*mdo_link)(struct md_object *tobj, struct md_object *sobj, const char *name, struct context *uctxt); int (*mdo_attr_get)(struct md_object *obj, void *buf, int buf_len, - const char *name, struct context *uctxt); - int (*mdo_attr_set)(struct md_object *obj, void *buf, int buf_len, const char *name, struct context *uctxt); - int (*mdo_index_insert)(struct md_object *pobj, struct md_object *obj, + int (*mdo_attr_set)(struct md_object *obj, void *buf, int buf_len, + const char *name, struct context *uctxt); + int (*mdo_index_insert)(struct md_object *pobj, struct md_object *obj, const char *name, struct context *uctxt); - int (*mdo_index_delete)(struct md_object *pobj, struct md_object *obj, + int (*mdo_index_delete)(struct md_object *pobj, struct md_object *obj, const char *name, struct context *uctxt); int (*mdo_object_create)(struct md_object *pobj, struct md_object *child, struct context *uctxt); @@ -88,12 +88,12 @@ static inline struct md_device *md_device_get(struct md_object *o) return container_of(o->mo_lu.lo_dev, struct md_device, md_lu_dev); } -static int md_device_init(struct md_device *md, struct lu_device_type *t) +static inline int md_device_init(struct md_device *md, struct lu_device_type *t) { return lu_device_init(&md->md_lu_dev, t); } -static void md_device_fini(struct md_device *md) +static inline void md_device_fini(struct md_device *md) { lu_device_fini(&md->md_lu_dev); } -- 1.8.3.1