Merge branch 'qgroup' of git://git.jan-o-sch.net/btrfs-unstable into for-linus
[linux-2.6-microblaze.git] / fs / btrfs / disk-io.c
index 87d9391..05f4fb6 100644 (file)
@@ -407,7 +407,7 @@ static int btree_read_extent_buffer_pages(struct btrfs_root *root,
                        break;
        }
 
-       if (failed && !ret)
+       if (failed && !ret && failed_mirror)
                repair_eb_io_failure(root, eb, failed_mirror);
 
        return ret;
@@ -2342,7 +2342,7 @@ int open_ctree(struct super_block *sb,
        ret |= btrfs_start_workers(&fs_info->caching_workers);
        ret |= btrfs_start_workers(&fs_info->readahead_workers);
        if (ret) {
-               ret = -ENOMEM;
+               err = -ENOMEM;
                goto fail_sb_buffer;
        }
 
@@ -2578,8 +2578,8 @@ retry_root_backup:
 
        if (!(sb->s_flags & MS_RDONLY)) {
                ret = btrfs_cleanup_fs_roots(fs_info);
-               if (ret) {
-                       }
+               if (ret)
+                       goto fail_trans_kthread;
 
                ret = btrfs_recover_relocation(tree_root);
                if (ret < 0) {
@@ -2895,7 +2895,7 @@ static int write_dev_flush(struct btrfs_device *device, int wait)
         * one reference for us, and we leave it for the
         * caller
         */
-       device->flush_bio = NULL;;
+       device->flush_bio = NULL;
        bio = bio_alloc(GFP_NOFS, 0);
        if (!bio)
                return -ENOMEM;