From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhang JieJing Subject: Re: [PATCH] ubifs: add update vfs super block infomation when remount to ro mode Date: Thu, 29 Apr 2010 14:38:20 +0800 Message-ID: References: <1272439453.7750.20.camel@localhost> <1272512811.2593.2.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org To: dedekind1@gmail.com Return-path: In-Reply-To: <1272512811.2593.2.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+gldm-linux-mtd-36=gmane.org@lists.infradead.org List-Id: linux-fsdevel.vger.kernel.org If some read/write error happens, 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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/