Commit bf609206 authored by David Sterba's avatar David Sterba Committed by Chris Mason

btrfs: sysfs: check initialization state before updating features

If the mount phase is not finished, we can't update the sysfs files.
Reported-by: default avatarChris Mason <clm@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 80ad623e
...@@ -804,6 +804,9 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info, ...@@ -804,6 +804,9 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info,
fs_devs = fs_info->fs_devices; fs_devs = fs_info->fs_devices;
fsid_kobj = &fs_devs->fsid_kobj; fsid_kobj = &fs_devs->fsid_kobj;
if (!fsid_kobj->state_initialized)
return;
/* /*
* FIXME: this is too heavy to update just one value, ideally we'd like * FIXME: this is too heavy to update just one value, ideally we'd like
* to use sysfs_update_group but some refactoring is needed first. * to use sysfs_update_group but some refactoring is needed first.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment