]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix error handling in make/read block group
authorJosef Bacik <jbacik@fusionio.com>
Tue, 2 Apr 2013 16:40:42 +0000 (12:40 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:54:32 +0000 (15:54 -0400)
commit79cd9464a550b80842b7c243cd30e7bec7885467
treea857b4aee9d38f88fcf54ef38859771333ed3bb3
parentc2d9a6c8478349e25497eeb1b276d347ad03bdfa
Btrfs: fix error handling in make/read block group

I noticed that we will add a block group to the space info before we add it to
the block group cache rb tree, so we could potentially allocate from the block
group before it's able to be searched for.  I don't think this is too much of
a problem, the race window is microscopic, but just in case move the tree
insertion to above the space info linking.  This makes it easier to adjust the
error handling as well, so we can remove a couple of BUG_ON(ret)'s and have real
error handling setup for these scenarios.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c