Chandra Seetharaman 452c75c3d2 Btrfs: Simplify the logic in alloc_extent_buffer() for existing extent buffer case
alloc_extent_buffer() uses radix_tree_lookup() when radix_tree_insert()
fails with EEXIST. That part of the code is very similar to the code in
find_extent_buffer(). This patch replaces radix_tree_lookup() and
surrounding code in alloc_extent_buffer() with find_extent_buffer().

Note that radix_tree_lookup() does not need to be protected by
tree->buffer_lock. It is protected by eb->refs.

While at it, this patch
  - changes the other usage of radix_tree_lookup() in alloc_extent_buffer()
    with find_extent_buffer() to reduce redundancy.
  - removes the unused argument 'len' to find_extent_buffer().

Signed-Off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Zach Brown <zab@redhat.com>

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-11-11 21:59:11 -05:00
..
2013-11-11 21:57:30 -05:00
2013-06-29 12:57:00 +04:00
2013-05-06 15:54:34 -04:00
2012-10-09 09:14:45 -04:00
2013-09-01 08:16:32 -04:00
2013-03-14 14:57:10 -04:00
2013-11-11 21:57:30 -05:00
2013-02-01 14:24:23 -05:00
2013-11-11 21:57:30 -05:00
2012-10-09 09:19:57 -04:00