X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmgc%2Fmgc_request.c;h=9f2d0053729fd98dbd4f0bb36cff1bbed5906f66;hp=347590f972bc6f3f8eb83fa05ab59ff3606fdf24;hb=2d15edc7be83555a7fa17a666d99b6af4922ab82;hpb=227ed3d87354cc1122343ef4f4e931960d1fe276 diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index 347590f..9f2d005 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -96,7 +96,8 @@ int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id, int type) } EXPORT_SYMBOL(mgc_fsname2resid); -int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id, int type) +static int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id, + int type) { char *name_end; int len; @@ -1174,9 +1175,9 @@ static int mgc_target_register(struct obd_export *exp, RETURN(rc); } -int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp, - obd_count keylen, void *key, obd_count vallen, - void *val, struct ptlrpc_request_set *set) +static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp, + obd_count keylen, void *key, obd_count vallen, + void *val, struct ptlrpc_request_set *set) { int rc = -EINVAL; ENTRY; @@ -1527,12 +1528,11 @@ static int mgc_apply_recover_logs(struct obd_device *mgc, lustre_cfg_bufs_set_string(&bufs, 1, params); - rc = -ENOMEM; - lcfg = lustre_cfg_new(LCFG_PARAM, &bufs); - if (lcfg == NULL) { - CERROR("mgc: cannot allocate memory\n"); - break; - } + lcfg = lustre_cfg_new(LCFG_PARAM, &bufs); + if (lcfg == NULL) { + rc = -ENOMEM; + break; + } CDEBUG(D_INFO, "ir apply logs "LPD64"/"LPD64" for %s -> %s\n", prev_version, max_version, obdname, params); @@ -2034,7 +2034,7 @@ out: RETURN(rc); } -struct obd_ops mgc_obd_ops = { +static struct obd_ops mgc_obd_ops = { .o_owner = THIS_MODULE, .o_setup = mgc_setup, .o_precleanup = mgc_precleanup, @@ -2049,7 +2049,7 @@ struct obd_ops mgc_obd_ops = { .o_process_config = mgc_process_config, }; -int __init mgc_init(void) +static int __init mgc_init(void) { return class_register_type(&mgc_obd_ops, NULL, true, NULL, LUSTRE_MGC_NAME, NULL);