Re: [PATCH] fs: support filename refcount without atomics

From: kernel test robot
Date: Sat Mar 08 2025 - 08:49:07 EST


Hi Mateusz,

kernel test robot noticed the following build errors:

[auto build test ERROR on brauner-vfs/vfs.all]
[also build test ERROR on linus/master v6.14-rc5 next-20250307]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Mateusz-Guzik/fs-support-filename-refcount-without-atomics/20250308-002442
base: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git vfs.all
patch link: https://lore.kernel.org/r/20250307161155.760949-1-mjguzik%40gmail.com
patch subject: [PATCH] fs: support filename refcount without atomics
config: i386-buildonly-randconfig-001-20250308 (https://download.01.org/0day-ci/archive/20250308/202503082155.OjmOoifN-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250308/202503082155.OjmOoifN-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
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503082155.OjmOoifN-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/swait.h:5,
from include/linux/completion.h:12,
from include/linux/crypto.h:15,
from arch/x86/kernel/asm-offsets.c:9:
include/linux/fs.h: In function 'makeatomicname':
>> include/linux/fs.h:2875:24: error: 'struct filename' has no member named 'owner'
2875 | VFS_BUG_ON(name->owner != current && !name->is_atomic);
| ^~
include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
| ^
include/linux/fs.h:2875:9: note: in expansion of macro 'VFS_BUG_ON'
2875 | VFS_BUG_ON(name->owner != current && !name->is_atomic);
| ^~~~~~~~~~
include/linux/fs.h: In function 'refname':
include/linux/fs.h:2884:24: error: 'struct filename' has no member named 'owner'
2884 | VFS_BUG_ON(name->owner != current && !name->is_atomic);
| ^~
include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
30 | #define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
| ^
include/linux/fs.h:2884:9: note: in expansion of macro 'VFS_BUG_ON'
2884 | VFS_BUG_ON(name->owner != current && !name->is_atomic);
| ^~~~~~~~~~
make[3]: *** [scripts/Makefile.build:102: arch/x86/kernel/asm-offsets.s] Error 1 shuffle=2878351160
make[3]: Target 'prepare' not remade because of errors.
make[2]: *** [Makefile:1264: prepare0] Error 2 shuffle=2878351160
make[2]: Target 'prepare' not remade because of errors.
make[1]: *** [Makefile:251: __sub-make] Error 2 shuffle=2878351160
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:251: __sub-make] Error 2 shuffle=2878351160
make: Target 'prepare' not remade because of errors.


vim +2875 include/linux/fs.h

2866
2867 static inline void makeatomicname(struct filename *name)
2868 {
2869 VFS_BUG_ON(IS_ERR_OR_NULL(name));
2870 /*
2871 * The name can legitimately already be atomic if it was cached by audit.
2872 * If switching the refcount to atomic, we need not to know we are the
2873 * only non-atomic user.
2874 */
> 2875 VFS_BUG_ON(name->owner != current && !name->is_atomic);
2876 /*
2877 * Don't bother branching, this is a store to an already dirtied cacheline.
2878 */
2879 name->is_atomic = true;
2880 }
2881

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