Found by syzbot (https://syzkaller.appspot.com/bug?extid=340581ba9dceb7e06fb3) log (6.6.61): EXT4-fs (loop0): encrypted files will use data=ordered instead of data journaling mode EXT4-fs (loop0): 1 truncate cleaned up EXT4-fs (loop0): mounted filesystem 00000000-0000-0000-0000-000000000000 r/w without journal. Quota mode: none. fscrypt: AES-256-CTS-CBC using implementation "cts-cbc-aes-aesni" ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3775 at fs/crypto/fname.c:567 fscrypt_fname_siphash (fs/crypto/fname.c:567) CPU: 0 PID: 3775 Comm: fscrypt_fname_s Not tainted 6.6.61-un-def-alt1.kasan #1 RIP: 0010:fscrypt_fname_siphash (fs/crypto/fname.c:567 (discriminator 1)) Call Trace: <TASK> __ext4fs_dirhash (fs/ext4/hash.c:268) ext4fs_dirhash (fs/ext4/hash.c:322) htree_dirblock_to_tree (fs/ext4/namei.c:1127) ext4_htree_fill_tree (fs/ext4/namei.c:1222) ext4_readdir (fs/ext4/dir.c:608 fs/ext4/dir.c:142) iterate_dir (fs/readdir.c:106) __x64_sys_getdents64 (fs/readdir.c:406 fs/readdir.c:390 fs/readdir.c:390) do_syscall_64 (arch/x86/entry/common.c:51 arch/x86/entry/common.c:81) ... </TASK> These patches address a warning encountered when mounting ext4 filesystems with the default hash version set to SIPHASH while the casefold feature is not enabled. The warning occurs due to incorrect error handling and setup of the default hash version. [PATCH 1/2] ext4: filesystems without casefold feature cannot be mounted with siphash Ensures that ext4 filesystems with the default hash set to SIPHASH cannot be mounted if the casefold feature is not enabled. [PATCH 2/2] ext4: fix error message when rejecting the default hash Corrects the error message logic for rejecting filesystems with the default SIPHASH hash version, ensuring the error message doesn't incorrectly reference the casefold setup. Also moves the check to ext4_hash_info_init to ensure consistency.