Whamcloud - gitweb
Fixes related to mount failure path cleanup
authordeshmukh <deshmukh>
Mon, 24 Nov 2008 07:25:35 +0000 (07:25 +0000)
committerdeshmukh <deshmukh>
Mon, 24 Nov 2008 07:25:35 +0000 (07:25 +0000)
b=17752
i=umka
i=shadow

lustre/mdt/mdt_handler.c
lustre/obdclass/obd_mount.c

index 451ea3e..4d2eb41 100644 (file)
@@ -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);
                 }
         }
 
index fcac24c..979aaa5 100644 (file)
@@ -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);
         }