* [PATCH 3.19-rc] btrfs: add read-only check to sysfs handler of features
@ 2015-01-23 17:52 David Sterba
2015-01-30 17:08 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: David Sterba @ 2015-01-23 17:52 UTC (permalink / raw)
To: linux-btrfs; +Cc: David Sterba
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>
---
This emerged during the discussions about pending changes problems.
fs/btrfs/sysfs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c
index 92db3f648df4..00b9c46e351c 100644
--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -119,6 +119,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;
--
2.1.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 3.19-rc] btrfs: add read-only check to sysfs handler of features
2015-01-23 17:52 [PATCH 3.19-rc] btrfs: add read-only check to sysfs handler of features David Sterba
@ 2015-01-30 17:08 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2015-01-30 17:08 UTC (permalink / raw)
To: clm; +Cc: David Sterba, linux-btrfs
On Fri, Jan 23, 2015 at 06:52:11PM +0100, David Sterba wrote:
> 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>
Please drop this patch, seems that the right way to the ro/rw & freeze
protection is to use sb_start_write & co.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-30 17:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 17:52 [PATCH 3.19-rc] btrfs: add read-only check to sysfs handler of features David Sterba
2015-01-30 17:08 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).