From patchwork Thu Apr 8 07:00:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: ZhangJieJing X-Patchwork-Id: 49700 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B5CF2B7D0F for ; Thu, 8 Apr 2010 17:02:05 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Nzliv-0002OX-Tx; Thu, 08 Apr 2010 07:00:21 +0000 Received: from mail-pz0-f182.google.com ([209.85.222.182]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Nzlit-0002MD-Il for linux-mtd@lists.infradead.org; Thu, 08 Apr 2010 07:00:20 +0000 Received: by pzk12 with SMTP id 12so1680243pzk.28 for ; Thu, 08 Apr 2010 00:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type:content-transfer-encoding; bh=w2HegbZ8Zpnjjae7M5Jt2IL98GV7glgeVmTc0+Dufk8=; b=FZuvTTnVoO0U2Ila5f97MppMxLnmTnpElVZJAhDvzIJ9OXHaWqAwXnPwu4Kw1/qaVP Ziv3OIqSZNmHN/6nKzguMDDYVmqJ8MfUdWFwhhiPCmiJqzw5Nq6uklWaadl+H50F5O9N vDEtMOk9LhRz0yew6SVKJXOwoZs1L+5yLtIXk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=EhS826tGRMdNgjJ+3WQSFhJbWE5jXnUPegIaqxHkBRPBDGKcIqIT9BlsuXOPmcKSo9 4DGqhkSE0E3Rw0BH9nR/5wUWuZM0CiGi+8d+Apfq4pQypZLOSybVUMRbMeASj8WfTzo7 rAkiHT8B1ilDL6sAoHapQkowSkoTi1e6X8Bds= MIME-Version: 1.0 Received: by 10.114.110.2 with HTTP; Thu, 8 Apr 2010 00:00:16 -0700 (PDT) Date: Thu, 8 Apr 2010 15:00:16 +0800 Received: by 10.114.188.30 with SMTP id l30mr10097468waf.134.1270710017002; Thu, 08 Apr 2010 00:00:17 -0700 (PDT) Message-ID: Subject: [PATCH] [ubifs] add update vfs super block infomation when remount to ro mode. From: ZhangJieJing To: linux-mtd@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100408_030019_716025_B9DE6C5F X-CRM114-Status: UNSURE ( 8.05 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.3.0 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is freemail (kzjeef[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.222.182 listed in list.dnswl.org] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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(-) -- 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();         }