diff options
| author | Chandra Seetharaman <[email protected]> | 2013-10-07 15:45:25 +0000 |
|---|---|---|
| committer | Chris Mason <[email protected]> | 2013-11-12 02:59:11 +0000 |
| commit | 452c75c3d2187089f6e846710e6ea7883bf30f8a (patch) | |
| tree | 0747512f55c254c1102fd878c9fca20c0138ea33 /fs/btrfs/dev-replace.c | |
| parent | Btrfs: fix up seek_hole/seek_data handling (diff) | |
| download | kernel-452c75c3d2187089f6e846710e6ea7883bf30f8a.tar.gz kernel-452c75c3d2187089f6e846710e6ea7883bf30f8a.zip | |
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 <[email protected]>
Reviewed-by: Zach Brown <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
