diff options
author | Jeff Mahoney <jeffm@suse.com> | 2009-02-12 10:06:15 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2009-02-12 10:06:15 -0500 |
commit | 7951f3cefbd711f4429a0cd014aa83a844c399a0 (patch) | |
tree | 7eec0bc3b933d71f99cad5379ef15bf1e084a572 /fs | |
parent | b335b0034e252e79ec2e9c6697f5d663c4627bec (diff) | |
download | blackbird-op-linux-7951f3cefbd711f4429a0cd014aa83a844c399a0.tar.gz blackbird-op-linux-7951f3cefbd711f4429a0cd014aa83a844c399a0.zip |
Btrfs: balance_level checks !child after access
The BUG_ON() is in the wrong spot.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/ctree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 35443cc4b9a9..6674692f7023 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -917,9 +917,9 @@ static noinline int balance_level(struct btrfs_trans_handle *trans, /* promote the child to a root */ child = read_node_slot(root, mid, 0); + BUG_ON(!child); btrfs_tree_lock(child); btrfs_set_lock_blocking(child); - BUG_ON(!child); ret = btrfs_cow_block(trans, root, child, mid, 0, &child, 0); BUG_ON(ret); |