Content-Type: multipart/mixed; boundary="===============4810310654364591265==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH v2 2/2] kernfs: Reduce contention around global per-fs kernfs_rwsem. Date: Tue, 04 Jan 2022 13:28:03 +0800 Message-ID: <202201041308.GXbResP1-lkp@intel.com> In-Reply-To: <20220103084544.1109829-3-imran.f.khan@oracle.com> List-Id: --===============4810310654364591265== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Imran, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on ea586a076e8aa606c59b66d86660590f18354b11] url: https://github.com/0day-ci/linux/commits/Imran-Khan/kernfs-use-kern= fs_node-specific-mutex-and-spinlock/20220103-164752 base: ea586a076e8aa606c59b66d86660590f18354b11 config: riscv-randconfig-r006-20220103 (https://download.01.org/0day-ci/arc= hive/20220104/202201041308.GXbResP1-lkp(a)intel.com/config) compiler: riscv32-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/3dd2a5f81a41be1f22391cc8e= f0ac78293de0141 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Imran-Khan/kernfs-use-kernfs_node-= specific-mutex-and-spinlock/20220103-164752 git checkout 3dd2a5f81a41be1f22391cc8ef0ac78293de0141 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Driscv SHELL=3D/bin/bash fs/kernfs/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): fs/kernfs/inode.c: In function 'kernfs_setattr': fs/kernfs/inode.c:102:29: warning: unused variable 'root' [-Wunused-vari= able] 102 | struct kernfs_root *root =3D kernfs_root(kn); | ^~~~ fs/kernfs/inode.c: In function 'kernfs_iop_setattr': >> fs/kernfs/inode.c:117:29: warning: variable 'root' set but not used [-Wu= nused-but-set-variable] 117 | struct kernfs_root *root; | ^~~~ fs/kernfs/inode.c: In function 'kernfs_iop_getattr': fs/kernfs/inode.c:194:29: warning: unused variable 'root' [-Wunused-vari= able] 194 | struct kernfs_root *root =3D kernfs_root(kn); | ^~~~ fs/kernfs/inode.c: In function 'kernfs_iop_permission': fs/kernfs/inode.c:288:29: warning: variable 'root' set but not used [-Wu= nused-but-set-variable] 288 | struct kernfs_root *root; | ^~~~ vim +/root +117 fs/kernfs/inode.c ffed24e22845a3 Tejun Heo 2013-11-28 111 = 549c7297717c32 Christian Brauner 2021-01-21 112 int kernfs_iop_setattr(st= ruct user_namespace *mnt_userns, struct dentry *dentry, 549c7297717c32 Christian Brauner 2021-01-21 113 struct iattr *ia= ttr) ffed24e22845a3 Tejun Heo 2013-11-28 114 { 2b0143b5c986be David Howells 2015-03-17 115 struct inode *inode =3D = d_inode(dentry); 319ba91d352a74 Shaohua Li 2017-07-12 116 struct kernfs_node *kn = =3D inode->i_private; 393c3714081a53 Minchan Kim 2021-11-18 @117 struct kernfs_root *root; ffed24e22845a3 Tejun Heo 2013-11-28 118 int error; ffed24e22845a3 Tejun Heo 2013-11-28 119 = 324a56e16e44ba Tejun Heo 2013-12-11 120 if (!kn) ffed24e22845a3 Tejun Heo 2013-11-28 121 return -EINVAL; ffed24e22845a3 Tejun Heo 2013-11-28 122 = 393c3714081a53 Minchan Kim 2021-11-18 123 root =3D kernfs_root(kn); 3dd2a5f81a41be Imran Khan 2022-01-03 124 kernfs_get(kn); 3dd2a5f81a41be Imran Khan 2022-01-03 125 down_write(&kn->kernfs_i= op_rwsem); 2f221d6f7b881d Christian Brauner 2021-01-21 126 error =3D setattr_prepar= e(&init_user_ns, dentry, iattr); ffed24e22845a3 Tejun Heo 2013-11-28 127 if (error) ffed24e22845a3 Tejun Heo 2013-11-28 128 goto out; ffed24e22845a3 Tejun Heo 2013-11-28 129 = 324a56e16e44ba Tejun Heo 2013-12-11 130 error =3D __kernfs_setat= tr(kn, iattr); ffed24e22845a3 Tejun Heo 2013-11-28 131 if (error) ffed24e22845a3 Tejun Heo 2013-11-28 132 goto out; ffed24e22845a3 Tejun Heo 2013-11-28 133 = ffed24e22845a3 Tejun Heo 2013-11-28 134 /* this ignores size cha= nges */ 2f221d6f7b881d Christian Brauner 2021-01-21 135 setattr_copy(&init_user_= ns, inode, iattr); ffed24e22845a3 Tejun Heo 2013-11-28 136 = ffed24e22845a3 Tejun Heo 2013-11-28 137 out: 3dd2a5f81a41be Imran Khan 2022-01-03 138 up_write(&kn->kernfs_iop= _rwsem); 3dd2a5f81a41be Imran Khan 2022-01-03 139 kernfs_put(kn); ffed24e22845a3 Tejun Heo 2013-11-28 140 return error; ffed24e22845a3 Tejun Heo 2013-11-28 141 } ffed24e22845a3 Tejun Heo 2013-11-28 142 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4810310654364591265==--