Hi Christoph, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20200721] [cannot apply to driver-core/driver-core-testing linux/master song-md/md-next linus/master v5.8-rc6 v5.8-rc5 v5.8-rc4 v5.8-rc7] [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/Christoph-Hellwig/fs-refactor-do_mount/20200722-012830 base: de2e69cfe54a8f2ed4b75f09d3110c514f45d38e compiler: mips-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck warnings: (new ones prefixed by >>) >> init/fs.c:53:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment] error = security_path_chroot(&path); ^ init/fs.c:50:8: note: Variable 'error' is reassigned a value before the old one has been used. error = -EPERM; ^ init/fs.c:53:8: note: Variable 'error' is reassigned a value before the old one has been used. error = security_path_chroot(&path); ^ -- >> init/initramfs.c:109:6: warning: Local variable error shadows outer function [shadowFunction] int error; ^ init/initramfs.c:41:20: note: Shadowed declaration static void __init error(char *x) ^ init/initramfs.c:109:6: note: Shadow variable int error; ^ vim +/error +53 init/fs.c 38 39 int __init init_chroot(const char *filename) 40 { 41 struct path path; 42 int error; 43 44 error = kern_path(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, &path); 45 if (error) 46 return error; 47 error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR); 48 if (error) 49 goto dput_and_out; 50 error = -EPERM; 51 if (!ns_capable(current_user_ns(), CAP_SYS_CHROOT)) 52 goto dput_and_out; > 53 error = security_path_chroot(&path); 54 if (error) 55 goto dput_and_out; 56 set_fs_root(current->fs, &path); 57 dput_and_out: 58 path_put(&path); 59 return error; 60 } 61 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org