From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH] ubifs: add update vfs super block infomation when remount to ro mode Date: Fri, 16 Apr 2010 22:10:19 +0300 Message-ID: <1271445019.2532.729.camel@localhost.localdomain> References: Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org To: ZhangJieJing Return-path: Received: from fg-out-1718.google.com ([72.14.220.158]:14330 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758387Ab0DPTKZ (ORCPT ); Fri, 16 Apr 2010 15:10:25 -0400 Received: by fg-out-1718.google.com with SMTP id 19so459511fgg.1 for ; Fri, 16 Apr 2010 12:10:23 -0700 (PDT) In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 2010-04-16 at 11:36 +0800, ZhangJieJing wrote: > If some read/write error happens(eg.CRC error), ubifs make self a rea= d > only mode, > but the vfs infomation still not update. > This patch add this also make /proc/mounts update. >=20 > Signed-off-by: Zhang Jiejing > --- > 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 =3D 1; > c->no_chk_data_crc =3D 0; > + c->vfs_sb->s_flags |=3D MS_RDONLY; > ubifs_warn("switched to read-only mode, error %d", err= ); > dbg_dump_stack(); > } Looks ok for me, thanks, I'll take it to the ubifs-2.6.git tree as soon as I return to my work office (in 2 weeks). --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- 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