diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-06-11 21:33:38 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-06-11 21:33:38 -0400 |
commit | 5276aedab0baacfb3c5483208b8be85a8416bd5f (patch) | |
tree | d9370bef282b75e0e2b81ab1f74c146fd308cfd6 /fs/btrfs/super.c | |
parent | 0cf6c620176a294bdf1bedddc492f6ae857e0019 (diff) |
Btrfs: fix oops after block group lookup
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r-- | fs/btrfs/super.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 2b24a5a2be63..9749090cfbb8 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -62,7 +62,6 @@ static void btrfs_read_locked_inode(struct inode *inode) | |||
62 | struct btrfs_inode_item *inode_item; | 62 | struct btrfs_inode_item *inode_item; |
63 | struct btrfs_root *root = BTRFS_I(inode)->root; | 63 | struct btrfs_root *root = BTRFS_I(inode)->root; |
64 | struct btrfs_key location; | 64 | struct btrfs_key location; |
65 | struct btrfs_block_group_cache *alloc_group; | ||
66 | u64 alloc_group_block; | 65 | u64 alloc_group_block; |
67 | int ret; | 66 | int ret; |
68 | 67 | ||
@@ -95,11 +94,8 @@ static void btrfs_read_locked_inode(struct inode *inode) | |||
95 | inode->i_blocks = btrfs_inode_nblocks(inode_item); | 94 | inode->i_blocks = btrfs_inode_nblocks(inode_item); |
96 | inode->i_generation = btrfs_inode_generation(inode_item); | 95 | inode->i_generation = btrfs_inode_generation(inode_item); |
97 | alloc_group_block = btrfs_inode_block_group(inode_item); | 96 | alloc_group_block = btrfs_inode_block_group(inode_item); |
98 | ret = radix_tree_gang_lookup(&root->fs_info->block_group_radix, | 97 | BTRFS_I(inode)->block_group = btrfs_lookup_block_group(root->fs_info, |
99 | (void **)&alloc_group, | 98 | alloc_group_block); |
100 | alloc_group_block, 1); | ||
101 | BUG_ON(!ret); | ||
102 | BTRFS_I(inode)->block_group = alloc_group; | ||
103 | 99 | ||
104 | btrfs_free_path(path); | 100 | btrfs_free_path(path); |
105 | inode_item = NULL; | 101 | inode_item = NULL; |