btrfs: remove redundant counter check at btrfs_truncate_inode_items()
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Mar 2023 11:13:47 +0000 (11:13 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:19 +0000 (18:01 +0200)
commit4a6f5ccac52485226e7cade3dd7758f1a3ed8fa5
tree1f4addaa0c2c5f87974050d701167ee4ad6fccb4
parent9aa06c7669dd45b9cd2f4df6f948108d4df1e34c
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>
fs/btrfs/inode-item.c