]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove pointless return value update in btrfs_del_items()
authorFilipe Manana <fdmanana@suse.com>
Thu, 13 Nov 2025 12:59:19 +0000 (12:59 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 24 Nov 2025 21:42:24 +0000 (22:42 +0100)
The call to btrfs_del_leaf() can only return an error (negative value) or
zero (success). If we didn't get an error then 'ret' is zero, so it's
pointless to set it to zero again.

Reviewed-by: Qu Wenruo <wqu@suse.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/ctree.c

index 614aa4b56571ba00b71f4de785f8ac0bf0790ea8..e683f961742af2e832760deb46e6686fa74b183d 100644 (file)
@@ -4565,7 +4565,6 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
                                free_extent_buffer(leaf);
                                if (ret < 0)
                                        return ret;
-                               ret = 0;
                        } else {
                                /* if we're still in the path, make sure
                                 * we're dirty.  Otherwise, one of the