diff mbox

[ubifs] add update vfs super block infomation when remount to ro mode.

Message ID r2icf7b913c1004080000t3f7c8c15yb6cea17f0d0496b1@mail.gmail.com
State New, archived
Headers show

Commit Message

ZhangJieJing April 8, 2010, 7 a.m. UTC
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 <kzjeef@gmail.com>

Change-Id: I709ada21d1f6168d2e785eac389510e2b5edb2a4
---
 fs/ubifs/io.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

--
1.6.3.3

Comments

Artem Bityutskiy April 8, 2010, 7:13 a.m. UTC | #1
Hi,

On Thu, 2010-04-08 at 15:00 +0800, ZhangJieJing wrote:
> 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 <kzjeef@gmail.com>
> 
> Change-Id: I709ada21d1f6168d2e785eac389510e2b5edb2a4
> ---
>  fs/ubifs/io.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Could you please re-send this patch with CC to
linux-fsdevel@vger.kernel.org
diff mbox

Patch

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();
        }