aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 91fac54c70e3..703a62109cf2 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1194,11 +1194,7 @@ static int mount_ubifs(struct ubifs_info *c)
1194 if (c->bulk_read == 1) 1194 if (c->bulk_read == 1)
1195 bu_init(c); 1195 bu_init(c);
1196 1196
1197 /* 1197 c->mounting = 1;
1198 * We have to check all CRCs, even for data nodes, when we mount the FS
1199 * (specifically, when we are replaying).
1200 */
1201 c->always_chk_crc = 1;
1202 1198
1203 err = ubifs_read_superblock(c); 1199 err = ubifs_read_superblock(c);
1204 if (err) 1200 if (err)
@@ -1374,7 +1370,7 @@ static int mount_ubifs(struct ubifs_info *c)
1374 if (err) 1370 if (err)
1375 goto out_infos; 1371 goto out_infos;
1376 1372
1377 c->always_chk_crc = 0; 1373 c->mounting = 0;
1378 1374
1379 ubifs_msg("mounted UBI device %d, volume %d, name \"%s\"", 1375 ubifs_msg("mounted UBI device %d, volume %d, name \"%s\"",
1380 c->vi.ubi_num, c->vi.vol_id, c->vi.name); 1376 c->vi.ubi_num, c->vi.vol_id, c->vi.name);
@@ -1535,7 +1531,6 @@ static int ubifs_remount_rw(struct ubifs_info *c)
1535 mutex_lock(&c->umount_mutex); 1531 mutex_lock(&c->umount_mutex);
1536 dbg_save_space_info(c); 1532 dbg_save_space_info(c);
1537 c->remounting_rw = 1; 1533 c->remounting_rw = 1;
1538 c->always_chk_crc = 1;
1539 1534
1540 err = check_free_space(c); 1535 err = check_free_space(c);
1541 if (err) 1536 if (err)
@@ -1642,7 +1637,6 @@ static int ubifs_remount_rw(struct ubifs_info *c)
1642 dbg_gen("re-mounted read-write"); 1637 dbg_gen("re-mounted read-write");
1643 c->ro_mount = 0; 1638 c->ro_mount = 0;
1644 c->remounting_rw = 0; 1639 c->remounting_rw = 0;
1645 c->always_chk_crc = 0;
1646 err = dbg_check_space_info(c); 1640 err = dbg_check_space_info(c);
1647 mutex_unlock(&c->umount_mutex); 1641 mutex_unlock(&c->umount_mutex);
1648 return err; 1642 return err;
@@ -1659,7 +1653,6 @@ out:
1659 c->ileb_buf = NULL; 1653 c->ileb_buf = NULL;
1660 ubifs_lpt_free(c, 1); 1654 ubifs_lpt_free(c, 1);
1661 c->remounting_rw = 0; 1655 c->remounting_rw = 0;
1662 c->always_chk_crc = 0;
1663 mutex_unlock(&c->umount_mutex); 1656 mutex_unlock(&c->umount_mutex);
1664 return err; 1657 return err;
1665} 1658}