From patchwork Fri Apr 16 03:36:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: ubifs: add update vfs super block infomation when remount to ro mode From: ZhangJieJing X-Patchwork-Id: 50304 Message-Id: To: linux-mtd@lists.infradead.org Cc: linux-fsdevel@vger.kernel.org, Artem Bityutskiy Date: Fri, 16 Apr 2010 11:36:50 +0800 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 --- fs/ubifs/io.c |    1 +  1 files changed, 1 insertions(+), 0 deletions(-) -- 1.6.3.3 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();        }