add patch export-sysfs-casefold-feature-attribute
[ext4-patch-queue.git] / export-sysfs-casefold-feature-attribute
blobe87739099df932bedfc5643b67a72000f099ac77
1 ext4: export /sys/fs/ext4/feature/casefold if Unicode support is present
3 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
4 ---
5  fs/ext4/sysfs.c | 6 ++++++
6  1 file changed, 6 insertions(+)
8 diff --git a/fs/ext4/sysfs.c b/fs/ext4/sysfs.c
9 index 616c075da062..04b4f53f0659 100644
10 --- a/fs/ext4/sysfs.c
11 +++ b/fs/ext4/sysfs.c
12 @@ -238,6 +238,9 @@ EXT4_ATTR_FEATURE(meta_bg_resize);
13  #ifdef CONFIG_FS_ENCRYPTION
14  EXT4_ATTR_FEATURE(encryption);
15  #endif
16 +#ifdef CONFIG_UNICODE
17 +EXT4_ATTR_FEATURE(casefold);
18 +#endif
19  EXT4_ATTR_FEATURE(metadata_csum_seed);
21  static struct attribute *ext4_feat_attrs[] = {
22 @@ -246,6 +249,9 @@ static struct attribute *ext4_feat_attrs[] = {
23         ATTR_LIST(meta_bg_resize),
24  #ifdef CONFIG_FS_ENCRYPTION
25         ATTR_LIST(encryption),
26 +#endif
27 +#ifdef CONFIG_UNICODE
28 +       ATTR_LIST(casefold),
29  #endif
30         ATTR_LIST(metadata_csum_seed),
31         NULL,