From mboxrd@z Thu Jan 1 00:00:00 1970 From: ZhangJieJing Subject: [PATCH] ubifs: add update vfs super block infomation when remount to ro mode Date: Fri, 16 Apr 2010 11:36:50 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, Artem Bityutskiy To: linux-mtd@lists.infradead.org Return-path: Received: from qw-out-2122.google.com ([74.125.92.26]:51105 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757335Ab0DPDgv convert rfc822-to-8bit (ORCPT ); Thu, 15 Apr 2010 23:36:51 -0400 Received: by qw-out-2122.google.com with SMTP id 8so702366qwh.37 for ; Thu, 15 Apr 2010 20:36:51 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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: Zhang Jiejing --- =A0fs/ubifs/io.c | =A0 =A01 + =A01 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) =A0=A0 =A0 =A0 if (!c->ro_media) { =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 c->ro_media =3D 1; =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 c->no_chk_data_crc =3D 0; + =A0 =A0 =A0 =A0 =A0 =A0 c->vfs_sb->s_flags |=3D MS_RDONLY; =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 ubifs_warn("switched to read-only mode, = error %d", err); =A0=A0 =A0 =A0 =A0 =A0 =A0 =A0 dbg_dump_stack(); =A0=A0 =A0 =A0 } -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html