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

Commit 79aec2b8 authored by Anand Jain's avatar Anand Jain Committed by Chris Mason
Browse files

btrfs: sysfs label interface should check for read only FS



Not sure how this escaped many eyes so far

Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 20ee0825
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -377,6 +377,9 @@ static ssize_t btrfs_label_store(struct kobject *kobj,
	int ret;
	size_t p_len;

	if (fs_info->sb->s_flags & MS_RDONLY)
		return -EROFS;

	/*
	 * p_len is the len until the first occurrence of either
	 * '\n' or '\0'