[djbw-nvdimm:libnvdimm-pending 9/22] fs/xfs/xfs_super.c:734:33: warning: variable 'error' set but not used

From: kernel test robot
Date: Wed Sep 14 2022 - 06:10:38 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git libnvdimm-pending
head: e27a0356de15f16934325784c6b1d89cf0f13458
commit: 7df6bd39bccceef2f90dec6027a5de5c2f485dac [9/22] xfs: Add xfs_break_layouts() to the inode eviction path
config: arm-buildonly-randconfig-r003-20220914 (https://download.01.org/0day-ci/archive/20220914/202209141753.agkH4L40-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-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/djbw/nvdimm.git/commit/?id=7df6bd39bccceef2f90dec6027a5de5c2f485dac
git remote add djbw-nvdimm https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git
git fetch --no-tags djbw-nvdimm libnvdimm-pending
git checkout 7df6bd39bccceef2f90dec6027a5de5c2f485dac
# 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=arm SHELL=/bin/bash fs/xfs/

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

All warnings (new ones prefixed by >>):

fs/xfs/xfs_super.c: In function 'xfs_fs_evict_inode':
>> fs/xfs/xfs_super.c:734:33: warning: variable 'error' set but not used [-Wunused-but-set-variable]
734 | long error;
| ^~~~~


vim +/error +734 fs/xfs/xfs_super.c

727
728 STATIC void
729 xfs_fs_evict_inode(
730 struct inode *inode)
731 {
732 struct xfs_inode *ip = XFS_I(inode);
733 uint iolock = XFS_IOLOCK_EXCL | XFS_MMAPLOCK_EXCL;
> 734 long error;
735
736 xfs_ilock(ip, iolock);
737
738 error = xfs_break_layouts(inode, &iolock, BREAK_UNMAP_FINAL);
739
740 /* The final layout break is uninterruptible */
741 ASSERT(!error);
742
743 truncate_inode_pages_final(&inode->i_data);
744 clear_inode(inode);
745
746 xfs_iunlock(ip, iolock);
747 }
748

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