fs/pidfs.c:99:1: sparse: sparse: symbol 'pidfs_ino_lock' was not declared. Should it be static?

kernel test robot <[email protected]> Thu, 23 Jul 2026 15:15:48 +0800
Newsgroups dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4539944e515183668109bdf4d0c3d7d228383d88
commit: 87caaeef79950377b616f3ba2265a82742cb9583 pidfs: implement ino allocation without the pidmap lock
date:   5 months ago
config: i386-randconfig-062-20260723 (https://download.01.org/0day-ci/archive/20260723/[email protected]/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260723/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 87caaeef7995 ("pidfs: implement ino allocation without the pidmap lock")
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> fs/pidfs.c:99:1: sparse: sparse: symbol 'pidfs_ino_lock' was not declared. Should it be static?
   fs/pidfs.c:336:13: sparse: sparse: context imbalance in 'pidfd_info' - different lock contexts for basic block
   fs/pidfs.c:931:5: sparse: sparse: context imbalance in 'pidfs_register_pid' - different lock contexts for basic block

vim +/pidfs_ino_lock +99 fs/pidfs.c

    98	
  > 99	DEFINE_SPINLOCK(pidfs_ino_lock);
   100	static u64 pidfs_ino_nr = 1;
   101	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki