diff options
author | David Sterba <dsterba@suse.com> | 2016-01-27 14:06:29 +0100 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2016-01-27 14:40:10 +0100 |
commit | bf6092066f80840410e3401cd962b23d54a95713 (patch) | |
tree | 0d2e6c360d15afc0ec04b488b682e9d8c99c7d17 /fs | |
parent | Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()" (diff) | |
download | linux-bf6092066f80840410e3401cd962b23d54a95713.tar.xz linux-bf6092066f80840410e3401cd962b23d54a95713.zip |
btrfs: sysfs: check initialization state before updating features
If the mount phase is not finished, we can't update the sysfs files.
Reported-by: Chris Mason <clm@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/sysfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index 6986886243bf..539e7b5e3f86 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -804,6 +804,9 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info, fs_devs = fs_info->fs_devices; 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 * to use sysfs_update_group but some refactoring is needed first. |