Btrfs: do not return EINVAL instead of ENOMEM from open_ctree()
authorIlya Dryomov <idryomov@gmail.com>
Fri, 22 Jun 2012 18:13:01 +0000 (12:13 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 23 Jul 2012 20:27:52 +0000 (16:27 -0400)
When bailing from open_ctree() err is returned, not ret.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/btrfs/disk-io.c

index 2936ca49b3b4af3a799f7585b74038d289ab8278..fd216d9369faaa365bd72d53875898a3ee8103fd 100644 (file)
@@ -2244,7 +2244,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;
        }