All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: bigeasy@tglx.de, bigeasy@linutronix.de, dwmw2@infradead.org
Subject: + jffs2-check-if-partition-is-marked-ro-on-remount.patch added to -mm tree
Date: Fri, 21 Mar 2008 14:12:31 -0700	[thread overview]
Message-ID: <200803212112.m2LLCVn3010699@imap1.linux-foundation.org> (raw)


The patch titled
     jffs2: check if partition is marked RO on remount
has been added to the -mm tree.  Its filename is
     jffs2-check-if-partition-is-marked-ro-on-remount.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: jffs2: check if partition is marked RO on remount
From: Sebastian Siewior <bigeasy@tglx.de>

and if it is, don't tell userspace that write is possible.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/jffs2/fs.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN fs/jffs2/fs.c~jffs2-check-if-partition-is-marked-ro-on-remount fs/jffs2/fs.c
--- a/fs/jffs2/fs.c~jffs2-check-if-partition-is-marked-ro-on-remount
+++ a/fs/jffs2/fs.c
@@ -382,6 +382,9 @@ int jffs2_remount_fs (struct super_block
 	if (c->flags & JFFS2_SB_FLAG_RO && !(sb->s_flags & MS_RDONLY))
 		return -EROFS;
 
+	if (!(c->mtd->flags & MTD_WRITEABLE))
+		return -EROFS;
+
 	/* We stop if it was running, then restart if it needs to.
 	   This also catches the case where it was stopped and this
 	   is just a remount to restart it.
_

Patches currently in -mm which might be from bigeasy@tglx.de are

jffs2-check-if-partition-is-marked-ro-on-remount.patch
jffs2-check-if-partition-is-marked-ro-on-mount.patch


                 reply	other threads:[~2008-03-21 21:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803212112.m2LLCVn3010699@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=bigeasy@tglx.de \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.