fs/bpf_fs_kfuncs.c:377:26: sparse: sparse: symbol 'bpf_real_data_inode' was not declared. Should it be static?

From: kernel test robot

Date: Fri Sep 18 2026 - 07:27:49 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9b87fdc9af2fbfcdb5c24a64139685ef80f6573f
commit: 3f8c65b06fafc3f779abda5f7b81707411d05d4c bpf: have bpf_real_data_inode() take a struct file
date: 3 months ago
config: arm64-randconfig-r1307-20260918 (https://download.01.org/0day-ci/archive/20260918/202609181925.AkvGgS6u-lkp@xxxxxxxxx/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 7252edd9aa82ef1c570ff6694ef7f4763a8a5d2f)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260918/202609181925.AkvGgS6u-lkp@xxxxxxxxx/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: 3f8c65b06faf ("bpf: have bpf_real_data_inode() take a struct file")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609181925.AkvGgS6u-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> fs/bpf_fs_kfuncs.c:377:26: sparse: sparse: symbol 'bpf_real_data_inode' was not declared. Should it be static?

vim +/bpf_real_data_inode +377 fs/bpf_fs_kfuncs.c

361
362 /**
363 * bpf_real_data_inode - get the real inode hosting a file's data
364 * @file: file to resolve
365 *
366 * Resolve @file to the inode that hosts its data. For a regular file on a
367 * union/overlay filesystem this is the underlying (upper or lower) inode that
368 * stores the data, not the overlay inode.
369 *
370 * Data resolution only applies to regular files. For a non-regular file (e.g.
371 * a device node, fifo or socket) on a union/overlay filesystem the overlay
372 * inode itself is returned; for any file on a non-union filesystem the inode
373 * attached to @file is returned.
374 *
375 * Return: The inode hosting @file's data, or NULL.
376 */
> 377 __bpf_kfunc struct inode *bpf_real_data_inode(struct file *file)
378 {
379 return d_real_inode(file_dentry(file));
380 }
381

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