projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6c11f9
)
btrfs: add read-only check to sysfs handler of features
author
David Sterba
<dsterba@suse.cz>
Fri, 23 Jan 2015 17:43:31 +0000
(18:43 +0100)
committer
David Sterba
<dsterba@suse.com>
Fri, 6 May 2016 13:22:49 +0000
(15:22 +0200)
We don't want to trigger the change on a read-only filesystem, similar
to what the label handler does.
Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/sysfs.c
b/fs/btrfs/sysfs.c
index 539e7b5e3f86a83059f070409fdb36749a958ce4..6a6bb600b1ff43375490980f4dfc46e4b16601c2 100644
(file)
--- a/
fs/btrfs/sysfs.c
+++ b/
fs/btrfs/sysfs.c
@@
-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;