Re: [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold
From: kernel test robot
Date: Thu Dec 03 2026 - 06:45:26 EST
Hi Shuai,
kernel test robot noticed the following build errors:
[auto build test ERROR on tytso-ext4/dev]
[also build test ERROR on linus/master v7.4-rc5 next-20261202]
[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/Shuai-Liu/ext4-fix-NULL-s_encoding-after-runtime-tune_sb-enables-casefold/20261203-093038
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
patch link: https://lore.kernel.org/r/tencent_F27193C546272ADCA5A46D593AE4139ABE09%40qq.com
patch subject: [PATCH v3] ext4: fix NULL s_encoding after runtime tune_sb enables casefold
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261203/20261203190908.N2uDMQlX-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/20261203/20261203190908.N2uDMQlX-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/20261203190908.N2uDMQlX-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from <command-line>:
fs/ext4/ioctl.c: In function 'ext4_ioctl_set_tune_sb':
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
682 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
682 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
682 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
682 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:28: note: in expansion of macro '__native_word'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/linux/compiler_types.h:682:23: note: in definition of macro '__compiletime_assert'
682 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:702:9: note: in expansion of macro '_compiletime_assert'
702 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:36:9: note: in expansion of macro 'compiletime_assert'
36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/rwonce.h:49:9: note: in expansion of macro 'compiletime_assert_rwonce_type'
49 | compiletime_assert_rwonce_type(x); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/linux/compiler_types.h:635:53: note: in definition of macro '__unqual_scalar_typeof'
635 | #define __unqual_scalar_typeof(x) __typeof_unqual__(x)
| ^
include/asm-generic/rwonce.h:50:9: note: in expansion of macro '__READ_ONCE'
50 | __READ_ONCE(x); \
| ^~~~~~~~~~~
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
In file included from ./arch/x86/include/generated/asm/rwonce.h:1,
from include/linux/compiler.h:394,
from include/linux/export.h:5,
from include/linux/linkage.h:7,
from arch/x86/include/asm/cache.h:5,
from include/vdso/cache.h:5,
from include/linux/cache.h:6,
from include/linux/time.h:5,
from include/linux/stat.h:19,
from include/linux/fs_dirent.h:5,
from include/linux/fs/super_types.h:5,
from include/linux/fs/super.h:5,
from include/linux/fs.h:5,
from fs/ext4/ioctl.c:11:
>> fs/ext4/ioctl.c:1566:47: error: 'struct super_block' has no member named 's_encoding'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~
include/asm-generic/rwonce.h:44:73: note: in definition of macro '__READ_ONCE'
44 | #define __READ_ONCE(x) (*(const volatile __unqual_scalar_typeof(x) *)&(x))
| ^
fs/ext4/ioctl.c:1566:35: note: in expansion of macro 'READ_ONCE'
1566 | if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
| ^~~~~~~~~
vim +1566 fs/ext4/ioctl.c
1536
1537 static int ext4_ioctl_set_tune_sb(struct file *filp,
1538 struct ext4_tune_sb_params __user *in)
1539 {
1540 struct ext4_tune_sb_params params;
1541 struct super_block *sb = file_inode(filp)->i_sb;
1542 struct ext4_sb_info *sbi = EXT4_SB(sb);
1543 int ret;
1544 bool enabling_casefold;
1545
1546 if (!capable(CAP_SYS_ADMIN))
1547 return -EPERM;
1548
1549 if (copy_from_user(¶ms, in, sizeof(params)))
1550 return -EFAULT;
1551
1552 ret = ext4_validate_tune_sb_params(sb, ¶ms);
1553 if (ret)
1554 return ret;
1555
1556 enabling_casefold = (params.set_flags & EXT4_TUNE_FL_EDIT_FEATURES) &&
1557 (params.set_feature_incompat_mask &
1558 EXT4_FEATURE_INCOMPAT_CASEFOLD) &&
1559 !ext4_has_feature_casefold(sb);
1560
1561 ret = mnt_want_write_file(filp);
1562 if (ret)
1563 return ret;
1564
1565 /* A failed utf8_load() after commit leaves an unmountable fs. */
> 1566 if (enabling_casefold && !READ_ONCE(sb->s_encoding)) {
1567 ret = ext4_encoding_probe(sb, params.encoding);
1568 if (ret) {
1569 mnt_drop_write_file(filp);
1570 return ret;
1571 }
1572 }
1573
1574 ret = ext4_update_superblocks_fn(sb, ext4_sb_setparams, ¶ms);
1575
1576 /* Serialise concurrent callers: only one unicode_map may load. */
1577 if (ret == 0 && enabling_casefold) {
1578 static DEFINE_MUTEX(casefold_enable_lock);
1579
1580 mutex_lock(&casefold_enable_lock);
1581 ret = ext4_encoding_init(sb, sbi->s_es);
1582 mutex_unlock(&casefold_enable_lock);
1583 if (ret)
1584 ext4_msg(sb, KERN_ERR,
1585 "runtime tune_sb: encoding_init failed (%d)",
1586 ret);
1587 }
1588
1589 mnt_drop_write_file(filp);
1590
1591 if (params.set_flags & EXT4_TUNE_FL_DEF_HASH_ALG)
1592 sbi->s_def_hash_version = params.def_hash_alg;
1593
1594 return ret;
1595 }
1596
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki