Re: [PATCH] loop: prohibit the use of sysfs as a backing file

From: kernel test robot

Date: Mon Nov 02 2026 - 13:37:39 EST


Hi Edward,

kernel test robot noticed the following build errors:

[auto build test ERROR on axboe/for-next]
[also build test ERROR on linus/master v7.3 next-20261030]
[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/Edward-Adam-Davis/loop-prohibit-the-use-of-sysfs-as-a-backing-file/20261102-183354
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux.git for-next
patch link: https://lore.kernel.org/r/20261102103354.427722-1-eadavis%40sina.com
patch subject: [PATCH] loop: prohibit the use of sysfs as a backing file
config: nios2-defconfig (https://download.01.org/0day-ci/archive/20261103/202611030239.QMvbuUI3-lkp@xxxxxxxxx/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261103/202611030239.QMvbuUI3-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/202611030239.QMvbuUI3-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/block/loop.c: In function 'loop_check_backing_file':
>> drivers/block/loop.c:537:48: error: 'SYSFS_MAGIC' undeclared (first use in this function)
537 | if (file_inode(file)->i_sb->s_magic == SYSFS_MAGIC)
| ^~~~~~~~~~~
drivers/block/loop.c:537:48: note: each undeclared identifier is reported only once for each function it appears in


vim +/SYSFS_MAGIC +537 drivers/block/loop.c

528
529 static int loop_check_backing_file(struct file *file)
530 {
531 if (!file->f_op->read_iter)
532 return -EINVAL;
533
534 if ((file->f_mode & FMODE_WRITE) && !file->f_op->write_iter)
535 return -EINVAL;
536
> 537 if (file_inode(file)->i_sb->s_magic == SYSFS_MAGIC)
538 return -EINVAL;
539
540 return 0;
541 }
542

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