Skip to content

Commit

Permalink
ext4: Only advertise encrypted_casefold when encryption and unicode a…
Browse files Browse the repository at this point in the history
…re 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>
  • Loading branch information
Daniel Rosenberg authored and Theodore Ts'o committed Jun 6, 2021
1 parent 63e7f12 commit e71f99f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/ext4/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ EXT4_ATTR_FEATURE(verity);
#endif
EXT4_ATTR_FEATURE(metadata_csum_seed);
EXT4_ATTR_FEATURE(fast_commit);
#if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
EXT4_ATTR_FEATURE(encrypted_casefold);
#endif

static struct attribute *ext4_feat_attrs[] = {
ATTR_LIST(lazy_itable_init),
Expand All @@ -333,7 +335,9 @@ static struct attribute *ext4_feat_attrs[] = {
#endif
ATTR_LIST(metadata_csum_seed),
ATTR_LIST(fast_commit),
#if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION)
ATTR_LIST(encrypted_casefold),
#endif
NULL,
};
ATTRIBUTE_GROUPS(ext4_feat);
Expand Down

0 comments on commit e71f99f

Please sign in to comment.