tree: https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git locking-rework head: ecc26315fec63c1ce9a1420cb6d9b6e0d0c4d7f5 commit: 061e82bf86d54d981acb307eff1fa114e71c3854 [16/18] btrfs: change our extent buffer lock to a rw_semaphore config: h8300-randconfig-s032-20200810 (attached as .config) compiler: h8300-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.2-141-g19506bc2-dirty git checkout 061e82bf86d54d981acb307eff1fa114e71c3854 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=h8300 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> fs/btrfs/locking.c:204:6: sparse: sparse: context imbalance in '__btrfs_tree_lock' - wrong count at exit fs/btrfs/locking.c:217:6: sparse: sparse: context imbalance in 'btrfs_tree_lock' - wrong count at exit vim +/__btrfs_tree_lock +204 fs/btrfs/locking.c b4ce94de9b4d64 Chris Mason 2009-02-04 196 b4ce94de9b4d64 Chris Mason 2009-02-04 197 /* 061e82bf86d54d Josef Bacik 2020-08-06 198 * __btrfs_tree_lock: Lock for write. 061e82bf86d54d Josef Bacik 2020-08-06 199 * @eb - the eb to lock. 061e82bf86d54d Josef Bacik 2020-08-06 200 * @nest - the nesting to use for the lock. d4e253bbbc2036 David Sterba 2019-10-16 201 * 061e82bf86d54d Josef Bacik 2020-08-06 202 * Returns with the eb->lock write locked. b4ce94de9b4d64 Chris Mason 2009-02-04 203 */ b2b79494f64f21 Josef Bacik 2020-08-06 @204 void __btrfs_tree_lock(struct extent_buffer *eb, enum btrfs_lock_nesting nest) 78d933c79cb649 Jules Irenge 2020-03-31 205 __acquires(&eb->lock) bd681513fa6f2f Chris Mason 2011-07-16 206 { 34e73cc930a867 Qu Wenruo 2019-04-15 207 u64 start_ns = 0; 34e73cc930a867 Qu Wenruo 2019-04-15 208 34e73cc930a867 Qu Wenruo 2019-04-15 209 if (trace_btrfs_tree_lock_enabled()) 34e73cc930a867 Qu Wenruo 2019-04-15 210 start_ns = ktime_get_ns(); 34e73cc930a867 Qu Wenruo 2019-04-15 211 061e82bf86d54d Josef Bacik 2020-08-06 212 down_write_nested(&eb->lock, nest); 5b25f70f420076 Arne Jansen 2011-09-13 213 eb->lock_owner = current->pid; 34e73cc930a867 Qu Wenruo 2019-04-15 214 trace_btrfs_tree_lock(eb, start_ns); 925baeddc5b076 Chris Mason 2008-06-25 215 } 925baeddc5b076 Chris Mason 2008-06-25 216 :::::: The code at line 204 was first introduced by commit :::::: b2b79494f64f21306835ae706656a7b4316a7f4c btrfs: add nesting tags to the locking helpers :::::: TO: Josef Bacik :::::: CC: Josef Bacik --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org