lkml.org 
[lkml]   [2022]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectfs/btrfs/ioctl.c:4370: warning: expecting prototype for Try to acquire fs_info:(). Prototype was for btrfs_try_lock_balance() instead
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: aea23e7c464bfdec04b52cf61edb62030e9e0d0a
commit: 7fb10ed89e95e26f5f81087a75f2a4bfa43b1705 btrfs: introduce btrfs_try_lock_balance
date: 3 weeks ago
config: loongarch-allyesconfig (https://download.01.org/0day-ci/archive/20220814/202208142017.toR0Cz6v-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7fb10ed89e95e26f5f81087a75f2a4bfa43b1705
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7fb10ed89e95e26f5f81087a75f2a4bfa43b1705
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash fs/btrfs/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/btrfs/ioctl.c:4370: warning: expecting prototype for Try to acquire fs_info:(). Prototype was for btrfs_try_lock_balance() instead


vim +4370 fs/btrfs/ioctl.c

4357
4358 /**
4359 * Try to acquire fs_info::balance_mutex as well as set BTRFS_EXLCOP_BALANCE as
4360 * required.
4361 *
4362 * @fs_info: the filesystem
4363 * @excl_acquired: ptr to boolean value which is set to false in case balance
4364 * is being resumed
4365 *
4366 * Return 0 on success in which case both fs_info::balance is acquired as well
4367 * as exclusive ops are blocked. In case of failure return an error code.
4368 */
4369 static int btrfs_try_lock_balance(struct btrfs_fs_info *fs_info, bool *excl_acquired)
> 4370 {
4371 int ret;
4372
4373 /*
4374 * Exclusive operation is locked. Three possibilities:
4375 * (1) some other op is running
4376 * (2) balance is running
4377 * (3) balance is paused -- special case (think resume)
4378 */
4379 while (1) {
4380 if (btrfs_exclop_start(fs_info, BTRFS_EXCLOP_BALANCE)) {
4381 *excl_acquired = true;
4382 mutex_lock(&fs_info->balance_mutex);
4383 return 0;
4384 }
4385
4386 mutex_lock(&fs_info->balance_mutex);
4387 if (fs_info->balance_ctl) {
4388 /* This is either (2) or (3) */
4389 if (test_bit(BTRFS_FS_BALANCE_RUNNING, &fs_info->flags)) {
4390 /* This is (2) */
4391 ret = -EINPROGRESS;
4392 goto out_failure;
4393
4394 } else {
4395 mutex_unlock(&fs_info->balance_mutex);
4396 /*
4397 * Lock released to allow other waiters to
4398 * continue, we'll reexamine the status again.
4399 */
4400 mutex_lock(&fs_info->balance_mutex);
4401
4402 if (fs_info->balance_ctl &&
4403 !test_bit(BTRFS_FS_BALANCE_RUNNING, &fs_info->flags)) {
4404 /* This is (3) */
4405 *excl_acquired = false;
4406 return 0;
4407 }
4408 }
4409 } else {
4410 /* This is (1) */
4411 ret = BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS;
4412 goto out_failure;
4413 }
4414
4415 mutex_unlock(&fs_info->balance_mutex);
4416 }
4417
4418 out_failure:
4419 mutex_unlock(&fs_info->balance_mutex);
4420 *excl_acquired = false;
4421 return ret;
4422 }
4423

--
0-DAY CI Kernel Test Service
https://01.org/lkp

\
 
 \ /
  Last update: 2022-08-14 14:30    [W:0.035 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site