Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-2675 libcfs: add libcfs/byteorder.h
[fs/lustre-release.git]
/
lustre
/
mgc
/
libmgc.c
diff --git
a/lustre/mgc/libmgc.c
b/lustre/mgc/libmgc.c
index
ead0a68
..
ccf175f
100644
(file)
--- a/
lustre/mgc/libmgc.c
+++ b/
lustre/mgc/libmgc.c
@@
-27,7
+27,7
@@
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011,
Whamcloud, Inc
.
+ * Copyright (c) 2011,
2012, Intel Corporation
.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-49,37
+49,37
@@
#include <obd_class.h>
#include <lustre_dlm.h>
#include <lustre_log.h>
#include <obd_class.h>
#include <lustre_dlm.h>
#include <lustre_log.h>
-#include <lustre_fsfilt.h>
#include <lustre_disk.h>
#include <lustre_disk.h>
-
static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
{
-
int rc;
-
ENTRY;
+ int rc;
+ ENTRY;
- ptlrpcd_addref();
+ rc = ptlrpcd_addref();
+ if (rc < 0)
+ RETURN(rc);
-
rc = client_obd_setup(obd, lcfg);
-
if (rc)
-
GOTO(err_decref, rc);
+ rc = client_obd_setup(obd, lcfg);
+ if (rc)
+ GOTO(err_decref, rc);
-
/* liblustre only support null flavor to MGS */
-
obd->u.cli.cl_flvr_mgc.sf_rpc = SPTLRPC_FLVR_NULL;
+ /* liblustre only support null flavor to MGS */
+ obd->u.cli.cl_flvr_mgc.sf_rpc = SPTLRPC_FLVR_NULL;
-
rc = obd_llog_init(obd, &obd->obd_olg, obd, NULL);
-
if (rc) {
-
CERROR("failed to setup llogging subsystems\n");
-
GOTO(err_cleanup, rc);
-
}
+ rc = obd_llog_init(obd, &obd->obd_olg, obd, NULL);
+ if (rc) {
+ CERROR("failed to setup llogging subsystems\n");
+ GOTO(err_cleanup, rc);
+ }
-
RETURN(rc);
+ RETURN(rc);
err_cleanup:
err_cleanup:
-
client_obd_cleanup(obd);
+ client_obd_cleanup(obd);
err_decref:
err_decref:
-
ptlrpcd_decref();
-
RETURN(rc);
+ ptlrpcd_decref();
+ RETURN(rc);
}
static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
}
static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
@@
-101,12
+101,9
@@
static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
static int mgc_cleanup(struct obd_device *obd)
{
static int mgc_cleanup(struct obd_device *obd)
{
- struct client_obd *cli = &obd->u.cli;
int rc;
ENTRY;
int rc;
ENTRY;
- LASSERT(cli->cl_mgc_vfsmnt == NULL);
-
ptlrpcd_decref();
rc = client_obd_cleanup(obd);
ptlrpcd_decref();
rc = client_obd_cleanup(obd);
@@
-161,6
+158,6
@@
struct obd_ops mgc_obd_ops = {
int __init mgc_init(void)
{
int __init mgc_init(void)
{
-
return class_register_type(&mgc_obd_ops
, NULL,
-
NULL,
LUSTRE_MGC_NAME, NULL);
+
return class_register_type(&mgc_obd_ops, NULL, true
, NULL,
+ LUSTRE_MGC_NAME, NULL);
}
}