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: 471fbbea7ff7 ("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>

authored by

Daniel Rosenberg and committed by
Theodore Ts'o
e71f99f2 63e7f128

+4
+4
fs/ext4/sysfs.c
··· 315 315 #endif 316 316 EXT4_ATTR_FEATURE(metadata_csum_seed); 317 317 EXT4_ATTR_FEATURE(fast_commit); 318 + #if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION) 318 319 EXT4_ATTR_FEATURE(encrypted_casefold); 320 + #endif 319 321 320 322 static struct attribute *ext4_feat_attrs[] = { 321 323 ATTR_LIST(lazy_itable_init), ··· 335 333 #endif 336 334 ATTR_LIST(metadata_csum_seed), 337 335 ATTR_LIST(fast_commit), 336 + #if defined(CONFIG_UNICODE) && defined(CONFIG_FS_ENCRYPTION) 338 337 ATTR_LIST(encrypted_casefold), 338 + #endif 339 339 NULL, 340 340 }; 341 341 ATTRIBUTE_GROUPS(ext4_feat);