From: deshmukh Date: Mon, 24 Nov 2008 07:25:35 +0000 (+0000) Subject: Fixes related to mount failure path cleanup X-Git-Tag: v1_9_120~94 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=87bbe2fab5c1e8f3273428e2d3c26a147a03e5f4;hp=16b9e913b378fcf6ce17b8337beae93b8ec1fbb1;p=fs%2Flustre-release.git Fixes related to mount failure path cleanup b=17752 i=umka i=shadow --- 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); }