summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-17 01:10:02 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-08 19:34:39 -0500
commitad2b2c802be2d3e8ed8364fef5ffaddabe448219 (patch)
tree5927c2170cd4edb1d930cabae0c6f0006aa972fd /fs/btrfs/disk-io.c
parente3029d9fd426c8f582210ba35551ae5506218345 (diff)
downloadlwn-ad2b2c802be2d3e8ed8364fef5ffaddabe448219.tar.gz
lwn-ad2b2c802be2d3e8ed8364fef5ffaddabe448219.zip
btrfs: make open_ctree() return int
It returns either ERR_PTR(-ve) or sb->s_fs_info. The latter can be found by caller just as well, TYVM, no need to return it. Just return -ve or 0... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 9308c7f13c17..78247522c693 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1880,9 +1880,9 @@ static void free_root_pointers(struct btrfs_fs_info *info, int chunk_root)
}
-struct btrfs_root *open_ctree(struct super_block *sb,
- struct btrfs_fs_devices *fs_devices,
- char *options)
+int open_ctree(struct super_block *sb,
+ struct btrfs_fs_devices *fs_devices,
+ char *options)
{
u32 sectorsize;
u32 nodesize;
@@ -2428,11 +2428,11 @@ retry_root_backup:
if (err) {
close_ctree(tree_root);
free_fs_info(fs_info);
- return ERR_PTR(err);
+ return err;
}
}
- return tree_root;
+ return 0;
fail_trans_kthread:
kthread_stop(fs_info->transaction_kthread);
@@ -2479,7 +2479,7 @@ fail_srcu:
fail:
btrfs_close_devices(fs_info->fs_devices);
free_fs_info(fs_info);
- return ERR_PTR(err);
+ return err;
recovery_tree_root:
if (!btrfs_test_opt(tree_root, RECOVERY))