mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
e3029d9fd4
commit
ad2b2c802b
3 changed files with 13 additions and 13 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue