From mboxrd@z Thu Jan 1 00:00:00 1970 From: ZhangJieJing Subject: [ubifs] add update vfs super block infomation when remount to ro mode. Date: Thu, 8 Apr 2010 15:20:50 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: dedekind1@gmail.com, linux-fsdevel@vger.kernel.org To: linux-mtd@lists.infradead.org Return-path: Received: from mail-pz0-f193.google.com ([209.85.222.193]:45477 "EHLO mail-pz0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758531Ab0DHHUu (ORCPT ); Thu, 8 Apr 2010 03:20:50 -0400 Received: by pzk31 with SMTP id 31so1947957pzk.33 for ; Thu, 08 Apr 2010 00:20:50 -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: zhangjiejing 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