btrfs-progs: Remove redundant if

'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>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Nikolay Borisov 2019-06-19 17:04:37 +03:00 committed by David Sterba
parent 0323a6c777
commit 56c31f13d6

View File

@ -2075,7 +2075,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 !=
@ -2089,13 +2088,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);