From 87bbe2fab5c1e8f3273428e2d3c26a147a03e5f4 Mon Sep 17 00:00:00 2001 From: deshmukh Date: Mon, 24 Nov 2008 07:25:35 +0000 Subject: [PATCH] Fixes related to mount failure path cleanup b=17752 i=umka i=shadow --- lustre/mdt/mdt_handler.c | 3 +-- lustre/obdclass/obd_mount.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 451ea3e..4d2eb41 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -4276,14 +4276,13 @@ static int mdt_init0(const struct lu_env *env, struct mdt_device *m, } else { lsi = s2lsi(lmi->lmi_sb); fsoptions_to_mdt_flags(m, lsi->lsi_lmd->lmd_opts); - server_put_mount_2(dev, lmi->lmi_mnt); /* CMD is supported only in IAM mode */ ldd = lsi->lsi_ldd; LASSERT(num); node_id = simple_strtol(num, NULL, 10); if (!(ldd->ldd_flags & LDD_F_IAM_DIR) && node_id) { CERROR("CMD Operation not allowed in IOP mode\n"); - RETURN(-EINVAL); + GOTO(err_lmi, rc = -EINVAL); } } diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index fcac24c..979aaa5 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1135,6 +1135,7 @@ static int server_start_targets(struct super_block *sb, struct vfsmount *mnt) if (rc) { CERROR("failed to start server %s: %d\n", lsi->lsi_ldd->ldd_svname, rc); + server_deregister_mount(lsi->lsi_ldd->ldd_svname); GOTO(out_mgc, rc); } -- 1.8.3.1