mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
btrfs: remove redundant counter check at btrfs_truncate_inode_items()
At btrfs_truncate_inode_items(), in the while loop when we decide that we are going to delete an item, it's pointless to check that 'pending_del_nr' is non-zero in an else clause because the corresponding if statement is checking if 'pending_del_nr' has a value of zero. So just remove that condition from the else clause. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9aa06c7669
commit
4a6f5ccac5
@ -660,8 +660,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
|
||||
/* No pending yet, add ourselves */
|
||||
pending_del_slot = path->slots[0];
|
||||
pending_del_nr = 1;
|
||||
} else if (pending_del_nr &&
|
||||
path->slots[0] + 1 == pending_del_slot) {
|
||||
} else if (path->slots[0] + 1 == pending_del_slot) {
|
||||
/* Hop on the pending chunk */
|
||||
pending_del_nr++;
|
||||
pending_del_slot = path->slots[0];
|
||||
|
Loading…
Reference in New Issue
Block a user