Fix btrfs_fill_super to return -EINVAL when no FS found

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Yan
2008-04-01 11:21:34 -04:00
committed by Chris Mason
parent 63b10fc487
commit e58ca0203d
3 changed files with 4 additions and 5 deletions

View File

@@ -236,9 +236,9 @@ static int btrfs_fill_super(struct super_block * sb,
tree_root = open_ctree(sb, fs_devices);
if (!tree_root || IS_ERR(tree_root)) {
if (IS_ERR(tree_root)) {
printk("btrfs: open_ctree failed\n");
return -EIO;
return PTR_ERR(tree_root);
}
sb->s_fs_info = tree_root;
disk_super = &tree_root->fs_info->super_copy;