Re: [PATCH v1] mm: fix data-race in folio_batch_count()

From: kernel test robot

Date: Wed Jun 24 2026 - 09:55:46 EST


Hi Xuewen,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url: https://github.com/intel-lab-lkp/linux/commits/Xuewen-Wang/mm-fix-data-race-in-folio_batch_count/20260624-172724
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20260624092606.1083449-1-wangxuewen%40kylinos.cn
patch subject: [PATCH v1] mm: fix data-race in folio_batch_count()
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20260624/202606242115.DmNPrSkD-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260624/202606242115.DmNPrSkD-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/202606242115.DmNPrSkD-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from drivers/gpu/drm/i915/gem/i915_gem_shmem.c:6:
include/linux/folio_batch.h: In function 'folio_batch_count':
>> include/linux/folio_batch.h:56:16: error: implicit declaration of function 'READ_ONCE' [-Wimplicit-function-declaration]
56 | return READ_ONCE(fbatch->nr);
| ^~~~~~~~~


vim +/READ_ONCE +56 include/linux/folio_batch.h

53
54 static inline unsigned int folio_batch_count(const struct folio_batch *fbatch)
55 {
> 56 return READ_ONCE(fbatch->nr);
57 }
58

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