Skip to content

Commit

Permalink
btrfs: remove pointless initialization at btrfs_delayed_refs_rsv_rele…
Browse files Browse the repository at this point in the history
…ase()

There's no point in initializing to 0 the local variable 'released' as
we don't use it before the next assignment to it. So remove the
initialization. This may help avoid some warnings with clang tools such
as the one reported/fixed by commit 966de47 ("btrfs: remove redundant
initialization of variables in log_new_ancestors").

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>
  • Loading branch information
Filipe Manana authored and David Sterba committed Oct 12, 2023
1 parent 3ee56a5 commit b6ea3e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/delayed-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void btrfs_delayed_refs_rsv_release(struct btrfs_fs_info *fs_info, int nr)
{
struct btrfs_block_rsv *block_rsv = &fs_info->delayed_refs_rsv;
const u64 num_bytes = btrfs_calc_delayed_ref_bytes(fs_info, nr);
u64 released = 0;
u64 released;

released = btrfs_block_rsv_release(fs_info, block_rsv, num_bytes, NULL);
if (released)
Expand Down

0 comments on commit b6ea3e6

Please sign in to comment.