From: ZhangJieJing <kzjeef@gmail.com>
To: linux-mtd@lists.infradead.org
Cc: dedekind1@gmail.com, linux-fsdevel@vger.kernel.org
Subject: [ubifs] add update vfs super block infomation when remount to ro mode.
Date: Thu, 8 Apr 2010 15:20:50 +0800 [thread overview]
Message-ID: <j2hcf7b913c1004080020j3161fc72ya4af9f4be666b2e9@mail.gmail.com> (raw)
If some read/write error happens(eg.CRC error), ubifs make self a read
only mode,
but the vfs infomation still not update.
This patch add this also make /proc/mounts update.
Signed-off-by: zhangjiejing <kzjeef@gmail.com>
Change-Id: I709ada21d1f6168d2e785eac389510e2b5edb2a4
---
fs/ubifs/io.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c
index 0168271..d33c233 100644
--- a/fs/ubifs/io.c
+++ b/fs/ubifs/io.c
@@ -63,6 +63,7 @@ void ubifs_ro_mode(struct ubifs_info *c, int err)
if (!c->ro_media) {
c->ro_media = 1;
c->no_chk_data_crc = 0;
+ c->vfs_sb->s_flags |= MS_RDONLY;
ubifs_warn("switched to read-only mode, error %d", err);
dbg_dump_stack();
}
--
1.6.3.3
---
Best regards,
Zhang Jiejing
reply other threads:[~2010-04-08 7:20 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=j2hcf7b913c1004080020j3161fc72ya4af9f4be666b2e9@mail.gmail.com \
--to=kzjeef@gmail.com \
--cc=dedekind1@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.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 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).