/* All UBIFS nodes are protected by CRC checksums and UBIFS checks CRC when they are read from the flash media. ubifs_ro_mode - switch UBIFS to read read-only mode.  */
void ubifs_ro_mode(struct ubifs_info *c, int err)
/* All UBIFS nodes are protected by CRC checksums and UBIFS checks CRC when they are read from the flash media. ubifs_ro_mode - switch UBIFS to read read-only mode.  */
void ubifs_ro_mode(struct ubifs_info *c, int err)
{
	if (!c->ro_error) {
		c->ro_error = 1;
		c->no_chk_data_crc = 0;
		c->vfs_sb->s_flags |= MS_RDONLY;
		ubifs_warn(c, "switched to read-only mode, error %d", err);
		dump_stack();
	}
}