commit | 79aec2b80db1089f983d60e4a22cb95d8b939844 | [log] [tgz] |
---|---|---|
author | Anand Jain <Anand.Jain@oracle.com> | Wed Jul 30 20:04:10 2014 +0800 |
committer | Chris Mason <clm@fb.com> | Wed Sep 17 13:38:01 2014 -0700 |
tree | af9e646054814b3f81be56e7e4393316376f1104 | |
parent | 20ee0825ecec889afdf12f7c13b9dc3af0bb9f14 [diff] [blame] |
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>
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index e6a5e7d..b2e7bb4 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c
@@ -377,6 +377,9 @@ 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'