Skip to content

Commit e71f99f

Browse files
drosen-googletytso
authored andcommitted
ext4: Only advertise encrypted_casefold when encryption and unicode are enabled
Encrypted casefolding is only supported when both encryption and casefolding are both enabled in the config. Fixes: 471fbbe ("ext4: handle casefolding with encryption") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Daniel Rosenberg <drosen@google.com> Link: https://lore.kernel.org/r/20210603094849.314342-1-drosen@google.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 63e7f12 commit e71f99f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/ext4/sysfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,9 @@ EXT4_ATTR_FEATURE(verity);
315315
#endif
316316
EXT4_ATTR_FEATURE(metadata_csum_seed);
317317
EXT4_ATTR_FEATURE(fast_commit);
318+
#if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
318319
EXT4_ATTR_FEATURE(encrypted_casefold);
320+
#endif
319321

320322
static struct attribute *ext4_feat_attrs[] = {
321323
ATTR_LIST(lazy_itable_init),
@@ -333,7 +335,9 @@ static struct attribute *ext4_feat_attrs[] = {
333335
#endif
334336
ATTR_LIST(metadata_csum_seed),
335337
ATTR_LIST(fast_commit),
338+
#if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
336339
ATTR_LIST(encrypted_casefold),
340+
#endif
337341
NULL,
338342
};
339343
ATTRIBUTE_GROUPS(ext4_feat);

0 commit comments

Comments
 (0)