Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext4: Use generic_ci_validate_strict_name helper

Use the helper function to check the requirements for casefold
directories using strict encoding.

Suggested-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: André Almeida <andrealmeid@igalia.com>
Link: https://lore.kernel.org/r/20241021-tonyk-tmpfs-v8-2-f443d5814194@igalia.com
Acked-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

André Almeida and committed by
Christian Brauner
3f5ad0d2 0e152beb

+1 -4
+1 -4
fs/ext4/namei.c
··· 2395 2395 if (fscrypt_is_nokey_name(dentry)) 2396 2396 return -ENOKEY; 2397 2397 2398 - #if IS_ENABLED(CONFIG_UNICODE) 2399 - if (sb_has_strict_encoding(sb) && IS_CASEFOLDED(dir) && 2400 - utf8_validate(sb->s_encoding, &dentry->d_name)) 2398 + if (!generic_ci_validate_strict_name(dir, &dentry->d_name)) 2401 2399 return -EINVAL; 2402 - #endif 2403 2400 2404 2401 retval = ext4_fname_setup_filename(dir, &dentry->d_name, 0, &fname); 2405 2402 if (retval)