]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
UBIFS: mark VFS SB RO too
authorZhangJieJing <kzjeef@gmail.com>
Fri, 16 Apr 2010 03:36:50 +0000 (11:36 +0800)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 29 Apr 2010 12:12:18 +0000 (15:12 +0300)
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>
fs/ubifs/io.c

index 77d5cf4a75477055117e6f98529a4a7bdeea004b..bcf5a16f30bb26f865e49f27124dd0856a2f85d2 100644 (file)
@@ -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();
        }