]> git.baikalelectronics.ru Git - 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)
committerDavid Sterba <dsterba@suse.com>
Tue, 5 Apr 2022 22:49:15 +0000 (00:49 +0200)
commitabbce4be1606ce1a1969c37682c43e3135c4664d
treecb614c89da0f95200842a9c3eb8d31fab9b5a480
parent84b28edeca636734e128b6ab7e7974eea26f9f32
btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()

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: adf0bce62811 ("Btrfs: two stage dirty block group writeout")
Fixes: 6a258f627cc1 ("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>
fs/btrfs/block-group.c