]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
authorNathan Chancellor <nathan@kernel.org>
Thu, 24 Mar 2022 15:36:45 +0000 (08:36 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:00:34 +0000 (12:00 +0200)
commitf2965648a9e75a27d1fc3c1fc3c155dcd09850de
treea1635c97681c5f70223439959b64586508c440e2
parent75a8576e0bd9d98b985da10d7653bc9af9f05a16
btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()

BugLink: https://bugs.launchpad.net/bugs/1969857
commit 6d4a6b515c39f1f8763093e0f828959b2fbc2f45 upstream.

Clang's version of -Wunused-but-set-variable recently gained support for
unary operations, which reveals two unused variables:

  fs/btrfs/block-group.c:2949:6: error: variable 'num_started' set but not used [-Werror,-Wunused-but-set-variable]
          int num_started = 0;
              ^
  fs/btrfs/block-group.c:3116:6: error: variable 'num_started' set but not used [-Werror,-Wunused-but-set-variable]
          int num_started = 0;
              ^
  2 errors generated.

These variables appear to be unused from their introduction, so just
remove them to silence the warnings.

Fixes: c9dc4c657850 ("Btrfs: two stage dirty block group writeout")
Fixes: 1bbc621ef284 ("Btrfs: allow block group cache writeout outside critical section in commit")
CC: stable@vger.kernel.org # 5.4+
Link: https://github.com/ClangBuiltLinux/linux/issues/1614
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/btrfs/block-group.c