Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ee611138 authored by David Sterba's avatar David Sterba Committed by David Sterba
Browse files

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: default avatarDavid Sterba <dsterba@suse.cz>
parent e6c11f9a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;