提交 ee611138 编写于 作者: D David Sterba 提交者: David Sterba

btrfs: add read-only check to sysfs handler of features

We don't want to trigger the change on a read-only filesystem, similar
to what the label handler does.
Signed-off-by: NDavid Sterba <dsterba@suse.cz>
上级 e6c11f9a
......@@ -120,6 +120,9 @@ static ssize_t btrfs_feature_attr_store(struct kobject *kobj,
if (!fs_info)
return -EPERM;
if (fs_info->sb->s_flags & MS_RDONLY)
return -EROFS;
ret = kstrtoul(skip_spaces(buf), 0, &val);
if (ret)
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册