All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "btrfs: add read-only check to sysfs handler of features" has been added to the 4.5-stable tree
@ 2016-06-05 21:47 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-06-05 21:47 UTC (permalink / raw)
  To: dsterba, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    btrfs: add read-only check to sysfs handler of features

to the 4.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     btrfs-add-read-only-check-to-sysfs-handler-of-features.patch
and it can be found in the queue-4.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From ee6111386a1b304f8bf589d36810d53e3b27ee20 Mon Sep 17 00:00:00 2001
From: David Sterba <dsterba@suse.cz>
Date: Fri, 23 Jan 2015 18:43:31 +0100
Subject: btrfs: add read-only check to sysfs handler of features

From: David Sterba <dsterba@suse.cz>

commit ee6111386a1b304f8bf589d36810d53e3b27ee20 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/btrfs/sysfs.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/fs/btrfs/sysfs.c
+++ b/fs/btrfs/sysfs.c
@@ -120,6 +120,9 @@ static ssize_t btrfs_feature_attr_store(
 	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;


Patches currently in stable-queue which might be from dsterba@suse.cz are

queue-4.5/btrfs-add-read-only-check-to-sysfs-handler-of-features.patch
queue-4.5/btrfs-add-write-protection-to-set_features-ioctl.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-06-05 22:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-05 21:47 Patch "btrfs: add read-only check to sysfs handler of features" has been added to the 4.5-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.