diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-12-21 16:36:24 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:58 -0400 |
commit | e52ec0eb62e76ea584c8438ef92933e9b815db80 (patch) | |
tree | 255f8156b76ea343309dd4360e17a5fc7b9772c9 /fs/btrfs/inode.c | |
parent | edbd8d4efe4ddaf29a175ae504e2c9a05a96ebee (diff) |
Btrfs: Fix NULL block groups on reading the inode
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index f6a20112d9e7..3c7bf3bddcad 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -402,6 +402,10 @@ void btrfs_read_locked_inode(struct inode *inode) | |||
402 | BTRFS_I(inode)->block_group = btrfs_lookup_block_group(root->fs_info, | 402 | BTRFS_I(inode)->block_group = btrfs_lookup_block_group(root->fs_info, |
403 | alloc_group_block); | 403 | alloc_group_block); |
404 | 404 | ||
405 | if (!BTRFS_I(inode)->block_group) { | ||
406 | BTRFS_I(inode)->block_group = btrfs_find_block_group(root, | ||
407 | NULL, 0, 0, 0); | ||
408 | } | ||
405 | btrfs_free_path(path); | 409 | btrfs_free_path(path); |
406 | inode_item = NULL; | 410 | inode_item = NULL; |
407 | 411 | ||