btrfs: sysfs label interface should check for read only FS
Not sure how this escaped many eyes so far Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
parent
20ee0825ec
commit
79aec2b80d
1 changed files with 3 additions and 0 deletions
|
@ -377,6 +377,9 @@ static ssize_t btrfs_label_store(struct kobject *kobj,
|
||||||
int ret;
|
int ret;
|
||||||
size_t p_len;
|
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
|
* p_len is the len until the first occurrence of either
|
||||||
* '\n' or '\0'
|
* '\n' or '\0'
|
||||||
|
|
Loading…
Add table
Reference in a new issue