projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80ad623
)
btrfs: sysfs: check initialization state before updating features
author
David Sterba
<
[email protected]
>
Wed, 27 Jan 2016 13:06:29 +0000
(14:06 +0100)
committer
Chris Mason
<
[email protected]
>
Wed, 27 Jan 2016 13:40:10 +0000
(
05:40
-0800)
If the mount phase is not finished, we can't update the sysfs files.
Reported-by: Chris Mason <
[email protected]
>
Signed-off-by: David Sterba <
[email protected]
>
Signed-off-by: Chris Mason <
[email protected]
>
fs/btrfs/sysfs.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/sysfs.c
b/fs/btrfs/sysfs.c
index 6986886243bfceb1e1cb8dbf3cae662602b4358a..539e7b5e3f86a83059f070409fdb36749a958ce4 100644
(file)
--- 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.