Re: [PATCH v3 1/4] kernfs: move revalidate to be near lookup
From: kernel test robot
Date: Thu Apr 08 2021 - 23:39:52 EST
Hi Ian,
I love your patch! Yet something to improve:
[auto build test ERROR on driver-core/driver-core-testing]
[also build test ERROR on v5.12-rc6 next-20210408]
[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]
url: https://github.com/0day-ci/linux/commits/Ian-Kent/kernfs-proposed-locking-and-concurrency-improvement/20210409-091821
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git c2f3f755f5c717f3621b33ef06d974b9cec4a104
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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://github.com/0day-ci/linux/commit/a3608518cc551301c1c33dbf6976c360ea82a95c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ian-Kent/kernfs-proposed-locking-and-concurrency-improvement/20210409-091821
git checkout a3608518cc551301c1c33dbf6976c360ea82a95c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Note: the linux-review/Ian-Kent/kernfs-proposed-locking-and-concurrency-improvement/20210409-091821 HEAD b2217b0abf0a4518541559173ff04138a6e4f083 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
fs/kernfs/dir.c: In function 'kernfs_dop_revalidate':
>> fs/kernfs/dir.c:1048:7: error: implicit declaration of function 'kernfs_active_read'; did you mean 'kernfs_active'? [-Werror=implicit-function-declaration]
1048 | if (!kernfs_active_read(kn))
| ^~~~~~~~~~~~~~~~~~
| kernfs_active
cc1: some warnings being treated as errors
vim +1048 fs/kernfs/dir.c
1032
1033 static int kernfs_dop_revalidate(struct dentry *dentry, unsigned int flags)
1034 {
1035 struct kernfs_node *kn;
1036
1037 if (flags & LOOKUP_RCU)
1038 return -ECHILD;
1039
1040 /* Always perform fresh lookup for negatives */
1041 if (d_really_is_negative(dentry))
1042 goto out_bad_unlocked;
1043
1044 kn = kernfs_dentry_node(dentry);
1045 mutex_lock(&kernfs_mutex);
1046
1047 /* The kernfs node has been deactivated */
> 1048 if (!kernfs_active_read(kn))
1049 goto out_bad;
1050
1051 /* The kernfs node has been moved? */
1052 if (kernfs_dentry_node(dentry->d_parent) != kn->parent)
1053 goto out_bad;
1054
1055 /* The kernfs node has been renamed */
1056 if (strcmp(dentry->d_name.name, kn->name) != 0)
1057 goto out_bad;
1058
1059 /* The kernfs node has been moved to a different namespace */
1060 if (kn->parent && kernfs_ns_enabled(kn->parent) &&
1061 kernfs_info(dentry->d_sb)->ns != kn->ns)
1062 goto out_bad;
1063
1064 mutex_unlock(&kernfs_mutex);
1065 return 1;
1066 out_bad:
1067 mutex_unlock(&kernfs_mutex);
1068 out_bad_unlocked:
1069 return 0;
1070 }
1071
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip