]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Btrfs: cleanup for duplicated code in find_free_extent
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 14 Sep 2012 08:58:05 +0000 (02:58 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 1 Oct 2012 19:19:25 +0000 (15:19 -0400)
There is already an 'add free space' phrase in front of this one, we
needn't to redo it.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
fs/btrfs/extent-tree.c

index 8578cc0eb233eeaf86484805d6beb706298c8a17..6d81f66f5cd5bddb46e79b393da4cdf1e6c55dc4 100644 (file)
@@ -5811,10 +5811,6 @@ checks:
 
                trace_btrfs_reserve_extent(orig_root, block_group,
                                           search_start, num_bytes);
-               if (offset < search_start)
-                       btrfs_add_free_space(used_block_group, offset,
-                                            search_start - offset);
-               BUG_ON(offset > search_start);
                if (used_block_group != block_group)
                        btrfs_put_block_group(used_block_group);
                btrfs_put_block_group(block_group);