aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-06-28 11:31:58 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-05 11:45:19 -0400
commit1fb8bd01ed0af0d0577e010e8c6b4234de583fa6 (patch)
treeca8c24c96145a0ae45aa0ec6365e88aa8c5a9be3 /fs/ubifs/super.c
parent681947d2fa1a00629de33c4df3ca72c39f06a14c (diff)
UBIFS: fix assertion warning
When debugging is enabled and an unclean file-system is mounter, the following assertion is triggered: UBIFS assert failed in ubifs_tnc_start_commit at 805 (pid 1081) Call Trace: [cfaffbd0] [c0006cf8] show_stack+0x44/0x16c (unreliable) [cfaffc10] [c011b738] ubifs_tnc_start_commit+0xbb8/0xd18 [cfaffc90] [c0112670] do_commit+0x150/0xa44 [cfaffd10] [c0125234] ubifs_rcvry_gc_commit+0xd8/0x544 [cfaffd60] [c0100e9c] ubifs_fill_super+0xe78/0x15f8 [cfaffdf0] [c0102118] ubifs_get_sb+0x20c/0x320 [cfaffe70] [c007f764] vfs_kern_mount+0x58/0xe0 [cfaffe90] [c007f83c] do_kern_mount+0x40/0xf8 [cfaffeb0] [c0095c24] do_mount+0x550/0x758 [cfafff10] [c0095ebc] sys_mount+0x90/0xe0 [cfafff40] [c000ed4c] ret_from_syscall+0x0/0x3c The reason is that we initialize 'c->min_leb_idx' early, and do not re-calculate it after journal replay. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 76405c457a38..3507d0ed542d 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1287,6 +1287,9 @@ static int mount_ubifs(struct ubifs_info *c)
1287 if (err) 1287 if (err)
1288 goto out_journal; 1288 goto out_journal;
1289 1289
1290 /* Calculate 'min_idx_lebs' after journal replay */
1291 c->min_idx_lebs = ubifs_calc_min_idx_lebs(c);
1292
1290 err = ubifs_mount_orphans(c, c->need_recovery, mounted_read_only); 1293 err = ubifs_mount_orphans(c, c->need_recovery, mounted_read_only);
1291 if (err) 1294 if (err)
1292 goto out_orphans; 1295 goto out_orphans;