From: ZhangJieJing Date: Fri, 16 Apr 2010 03:36:50 +0000 (+0800) Subject: UBIFS: mark VFS SB RO too X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2fde99cb55fb9d9b88180512a5e8a5d939d27fec;p=mv-sheeva.git UBIFS: mark VFS SB RO too If some read/write error happens (eg.CRC error), UBIFS swotches to read-only mode, but the VFS infomation still not update. This patch add this also make /proc/mounts update. Signed-off-by: Zhang Jiejing --- diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 77d5cf4a754..bcf5a16f30b 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c @@ -64,6 +64,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(); }