btrfs: sysfs: replace direct access to feature set names with a helper

In order to unexport the feature type array, add a helper for the
enum-to-string conversion.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2019-08-01 19:07:55 +02:00
parent 27992d0145
commit f10152bcc9
3 changed files with 8 additions and 3 deletions

View File

@@ -5259,7 +5259,7 @@ static int check_feature_bits(struct btrfs_fs_info *fs_info,
u64 change_mask, u64 flags, u64 supported_flags,
u64 safe_set, u64 safe_clear)
{
const char *type = btrfs_feature_set_names[set];
const char *type = btrfs_feature_set_name(set);
char *names;
u64 disallowed, unsupported;
u64 set_mask = flags & change_mask;