]> 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)
commit3894572324a95e6124d6f9480debf0d76d90c278
treea857b4aee9d38f88fcf54ef38859771333ed3bb3
parent19e146c5fe16c78f7bd5e47f41c1fc77f2e221e9
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