projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20ee082
)
btrfs: sysfs label interface should check for read only FS
author
Anand Jain
<Anand.Jain@oracle.com>
Wed, 30 Jul 2014 12:04:10 +0000
(20:04 +0800)
committer
Chris Mason
<clm@fb.com>
Wed, 17 Sep 2014 20:38:01 +0000
(13:38 -0700)
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>
fs/btrfs/sysfs.c
patch
|
blob
|
history
diff --git
a/fs/btrfs/sysfs.c
b/fs/btrfs/sysfs.c
index e6a5e7d82f4286da251e6b00b4ccb4a936b6c055..b2e7bb4393f65cf17575dadc2686a693d83bd253 100644
(file)
--- a/
fs/btrfs/sysfs.c
+++ b/
fs/btrfs/sysfs.c
@@
-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'