From 05daa3ab9d38acf09f75e706a10bf6f63ae0127c Mon Sep 17 00:00:00 2001 From: Yan Date: Tue, 1 Apr 2008 11:21:34 -0400 Subject: [PATCH] --- yaml --- r: 128691 b: refs/heads/master c: e58ca0203d32869a01540a293df40ddc480dc378 h: refs/heads/master i: 128689: 517a7539064dd3a233513a56598cfd68eb496e46 128687: 1fa28840e10ebdfcc2f40e67c4db2a72fa6bbfc6 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/disk-io.c | 3 +-- trunk/fs/btrfs/super.c | 4 ++-- trunk/fs/btrfs/volumes.c | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index f4515494eaaf..91ba0c0888ed 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 63b10fc4874a014e22bc4c64e3d92b71180661fe +refs/heads/master: e58ca0203d32869a01540a293df40ddc480dc378 diff --git a/trunk/fs/btrfs/disk-io.c b/trunk/fs/btrfs/disk-io.c index 709e33d08bb5..5547607681f4 100644 --- a/trunk/fs/btrfs/disk-io.c +++ b/trunk/fs/btrfs/disk-io.c @@ -728,9 +728,8 @@ struct btrfs_root *open_ctree(struct super_block *sb, struct btrfs_root *dev_root = kmalloc(sizeof(struct btrfs_root), GFP_NOFS); int ret; - int err = -EIO; + int err = -EINVAL; struct btrfs_super_block *disk_super; - if (!extent_root || !tree_root || !fs_info) { err = -ENOMEM; goto fail; diff --git a/trunk/fs/btrfs/super.c b/trunk/fs/btrfs/super.c index 9624923a33dc..892864906880 100644 --- a/trunk/fs/btrfs/super.c +++ b/trunk/fs/btrfs/super.c @@ -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; diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index d8fce32a3bbc..169be0f7285b 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -237,7 +237,7 @@ int btrfs_scan_one_device(const char *path, int flags, void *holder, if (strncmp((char *)(&disk_super->magic), BTRFS_MAGIC, sizeof(disk_super->magic))) { printk("no btrfs found on %s\n", path); - ret = -ENOENT; + ret = -EINVAL; goto error_brelse; } devid = le64_to_cpu(disk_super->dev_item.devid);