@@ -2074,7 +2074,6 @@ static int __free_extent(struct btrfs_trans_handle *trans,
}
} else {
int mark_free = 0;
- int pin = 1;
if (found_extent) {
BUG_ON(is_data && refs_to_drop !=
@@ -2088,13 +2087,11 @@ static int __free_extent(struct btrfs_trans_handle *trans,
}
}
- if (pin) {
- ret = pin_down_bytes(trans, bytenr, num_bytes,
- is_data);
- if (ret > 0)
- mark_free = 1;
- BUG_ON(ret < 0);
- }
+ ret = pin_down_bytes(trans, bytenr, num_bytes,
+ is_data);
+ if (ret > 0)
+ mark_free = 1;
+ BUG_ON(ret < 0);
ret = btrfs_del_items(trans, extent_root, path, path->slots[0],
num_to_del);
'pin' is always true in __free_extent so there is no point in checking it. Just remove the if and unindent the code. Signed-off-by: Nikolay Borisov <nborisov@suse.com> --- extent-tree.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-)