From: Filipe Manana Date: Thu, 8 Sep 2022 11:31:52 +0000 (+0100) Subject: btrfs: remove useless used space increment during space reservation X-Git-Tag: v6.1-rc5~25^2~114 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b0b47a38596f32130cb6cbdd4f7be80778fc359a;p=platform%2Fkernel%2Flinux-starfive.git btrfs: remove useless used space increment during space reservation At space-info.c:__reserve_bytes(), we increment the 'used' variable, but then we don't use the variable anymore, making the increment pointless. The increment became useless with commit 2e294c60497f29 ("btrfs: simplify the logic in need_preemptive_flushing"), so just remove it. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index 2e06b7c..226727b 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -1686,7 +1686,6 @@ static int __reserve_bytes(struct btrfs_fs_info *fs_info, &space_info->priority_tickets); } } else if (!ret && space_info->flags & BTRFS_BLOCK_GROUP_METADATA) { - used += orig_bytes; /* * We will do the space reservation dance during log replay, * which means we won't have fs_info->fs_root set, so don't do