Skip to content

Commit

Permalink
btrfs: drop variable err in quick_update_accounting()
Browse files Browse the repository at this point in the history
In quick_update_accounting() err is used as 2nd return value, which could
be achieved just with ret.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Anand Jain authored and David Sterba committed May 7, 2024
1 parent acde0e8 commit 5e8fb9b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,18 +1536,15 @@ static int quick_update_accounting(struct btrfs_fs_info *fs_info,
{
struct btrfs_qgroup *qgroup;
int ret = 1;
int err = 0;

qgroup = find_qgroup_rb(fs_info, src);
if (!qgroup)
goto out;
if (qgroup->excl == qgroup->rfer) {
ret = 0;
err = __qgroup_excl_accounting(fs_info, dst, qgroup, sign);
if (err < 0) {
ret = err;
ret = __qgroup_excl_accounting(fs_info, dst, qgroup, sign);
if (ret < 0)
goto out;
}
ret = 0;
}
out:
if (ret)
Expand Down

0 comments on commit 5e8fb9b

Please sign in to comment.