mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +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 @@ delete:
|
||||
/* 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