aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-26 09:12:20 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-26 11:22:47 -0500
commit6ba87c9b920bea8c2703308d31eb7de925242c30 (patch)
treea83b51da6884e483f78ff85c81f37e9e4e66f064 /fs/ubifs
parent49d128aa60751a010640f4763d11577e2f508853 (diff)
UBIFS: fix assertions
I introduce wrong assertions in one of the previous commits, this patch fixes them. Also, initialize debugfs after the debugging check. This is a little nicer because we want the FS data to be accessible to external users after everything has been initialized. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index fd7fc7f3b7a6..dbfc88714716 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1320,20 +1320,21 @@ static int mount_ubifs(struct ubifs_info *c)
1320 else { 1320 else {
1321 c->need_recovery = 0; 1321 c->need_recovery = 0;
1322 ubifs_msg("recovery completed"); 1322 ubifs_msg("recovery completed");
1323 /* GC LEB has to be empty and taken at this point */
1324 ubifs_assert(c->lst.taken_empty_lebs == 1);
1323 } 1325 }
1324 } 1326 } else
1327 ubifs_assert(c->lst.taken_empty_lebs == 1);
1325 1328
1326 err = dbg_debugfs_init_fs(c); 1329 err = dbg_check_filesystem(c);
1327 if (err) 1330 if (err)
1328 goto out_infos; 1331 goto out_infos;
1329 1332
1330 err = dbg_check_filesystem(c); 1333 err = dbg_debugfs_init_fs(c);
1331 if (err) 1334 if (err)
1332 goto out_infos; 1335 goto out_infos;
1333 1336
1334 c->always_chk_crc = 0; 1337 c->always_chk_crc = 0;
1335 /* GC LEB has to be empty and taken at this point */
1336 ubifs_assert(c->lst.taken_empty_lebs == 1);
1337 1338
1338 ubifs_msg("mounted UBI device %d, volume %d, name \"%s\"", 1339 ubifs_msg("mounted UBI device %d, volume %d, name \"%s\"",
1339 c->vi.ubi_num, c->vi.vol_id, c->vi.name); 1340 c->vi.ubi_num, c->vi.vol_id, c->vi.name);
@@ -1663,7 +1664,7 @@ static void ubifs_remount_ro(struct ubifs_info *c)
1663 int i, err; 1664 int i, err;
1664 1665
1665 ubifs_assert(!c->need_recovery); 1666 ubifs_assert(!c->need_recovery);
1666 ubifs_assert(!c->ro_media); 1667 ubifs_assert(!(c->vfs_sb->s_flags & MS_RDONLY));
1667 1668
1668 commit_on_unmount(c); 1669 commit_on_unmount(c);
1669 mutex_lock(&c->umount_mutex); 1670 mutex_lock(&c->umount_mutex);