Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286025
b: refs/heads/master
c: ad2b2c8
h: refs/heads/master
i:
  286023: b8ab933
v: v3
  • Loading branch information
Al Viro committed Jan 9, 2012
1 parent ee3db4f commit 26c1223
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e3029d9fd426c8f582210ba35551ae5506218345
refs/heads/master: ad2b2c802be2d3e8ed8364fef5ffaddabe448219
12 changes: 6 additions & 6 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2428,11 +2428,11 @@ struct btrfs_root *open_ctree(struct super_block *sb,
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);
Expand Down Expand Up @@ -2479,7 +2479,7 @@ struct btrfs_root *open_ctree(struct super_block *sb,
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))
Expand Down
6 changes: 3 additions & 3 deletions trunk/fs/btrfs/disk-io.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
u64 bytenr, u32 blocksize);
int clean_tree_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct extent_buffer *buf);
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);
int close_ctree(struct btrfs_root *root);
int write_ctree_super(struct btrfs_trans_handle *trans,
struct btrfs_root *root, int max_mirrors);
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,12 @@ static int btrfs_fill_super(struct super_block *sb,
sb->s_flags |= MS_POSIXACL;
#endif

tree_root = open_ctree(sb, fs_devices, (char *)data);

if (IS_ERR(tree_root)) {
err = open_ctree(sb, fs_devices, (char *)data);
if (err) {
printk("btrfs: open_ctree failed\n");
return PTR_ERR(tree_root);
return err;
}
tree_root = sb->s_fs_info;
fs_info = tree_root->fs_info;
sb->s_fs_info = tree_root;

Expand Down

0 comments on commit 26c1223

Please sign in to comment.