浏览代码

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 <kzjeef@gmail.com>
ZhangJieJing 15 年之前
父节点
当前提交
2fde99cb55
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/ubifs/io.c

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