diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/super.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 6d357fd9c289..b5aeb5a8ebed 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -1282,13 +1282,13 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1282 | if (err) | 1282 | if (err) |
1283 | goto out_master; | 1283 | goto out_master; |
1284 | 1284 | ||
1285 | init_constants_master(c); | ||
1286 | |||
1285 | if ((c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY)) != 0) { | 1287 | if ((c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY)) != 0) { |
1286 | ubifs_msg("recovery needed"); | 1288 | ubifs_msg("recovery needed"); |
1287 | c->need_recovery = 1; | 1289 | c->need_recovery = 1; |
1288 | } | 1290 | } |
1289 | 1291 | ||
1290 | init_constants_master(c); | ||
1291 | |||
1292 | if (c->need_recovery && !c->ro_mount) { | 1292 | if (c->need_recovery && !c->ro_mount) { |
1293 | err = ubifs_recover_inl_heads(c, c->sbuf); | 1293 | err = ubifs_recover_inl_heads(c, c->sbuf); |
1294 | if (err) | 1294 | if (err) |
@@ -1299,6 +1299,12 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1299 | if (err) | 1299 | if (err) |
1300 | goto out_master; | 1300 | goto out_master; |
1301 | 1301 | ||
1302 | if (!c->ro_mount && c->space_fixup) { | ||
1303 | err = ubifs_fixup_free_space(c); | ||
1304 | if (err) | ||
1305 | goto out_master; | ||
1306 | } | ||
1307 | |||
1302 | if (!c->ro_mount) { | 1308 | if (!c->ro_mount) { |
1303 | /* | 1309 | /* |
1304 | * Set the "dirty" flag so that if we reboot uncleanly we | 1310 | * Set the "dirty" flag so that if we reboot uncleanly we |
@@ -1402,12 +1408,6 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1402 | } else | 1408 | } else |
1403 | ubifs_assert(c->lst.taken_empty_lebs > 0); | 1409 | ubifs_assert(c->lst.taken_empty_lebs > 0); |
1404 | 1410 | ||
1405 | if (!c->ro_mount && c->space_fixup) { | ||
1406 | err = ubifs_fixup_free_space(c); | ||
1407 | if (err) | ||
1408 | goto out_infos; | ||
1409 | } | ||
1410 | |||
1411 | err = dbg_check_filesystem(c); | 1411 | err = dbg_check_filesystem(c); |
1412 | if (err) | 1412 | if (err) |
1413 | goto out_infos; | 1413 | goto out_infos; |