]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Btrfs: fix panic on error during mount
authorJosef Bacik <jbacik@redhat.com>
Tue, 2 Dec 2008 11:36:10 +0000 (06:36 -0500)
committerChris Mason <chris.mason@oracle.com>
Tue, 2 Dec 2008 11:36:10 +0000 (06:36 -0500)
This needs to be applied on top of my previous patches, but is needed for more
than just my new stuff.  We're going to the wrong label when we have an error,
we try to stop the workers, but they are started below all of this code.  This
fixes it so we go to the right error label and not panic when we fail one of
these cases.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
fs/btrfs/disk-io.c

index 6ae9bdf98b682f6e57113ff775e923d016bb0add..dfd5ba05ce450d212d1691072aff7d34aaf2734b 100644 (file)
@@ -1579,12 +1579,12 @@ struct btrfs_root *open_ctree(struct super_block *sb,
 
        disk_super = &fs_info->super_copy;
        if (!btrfs_super_root(disk_super))
-               goto fail_sb_buffer;
+               goto fail_iput;
 
        ret = btrfs_parse_options(tree_root, options);
        if (ret) {
                err = ret;
-               goto fail_sb_buffer;
+               goto fail_iput;
        }
 
        features = btrfs_super_incompat_flags(disk_super) &
@@ -1594,7 +1594,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
                       "unsupported optional features (%Lx).\n",
                       features);
                err = -EINVAL;
-               goto fail_sb_buffer;
+               goto fail_iput;
        }
 
        features = btrfs_super_compat_ro_flags(disk_super) &
@@ -1604,7 +1604,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
                       "unsupported option features (%Lx).\n",
                       features);
                err = -EINVAL;
-               goto fail_sb_buffer;
+               goto fail_iput;
        }
 
        /*