diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-01-26 17:12:20 +0300 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-01-26 19:22:47 +0300 |
commit | 6ba87c9b920bea8c2703308d31eb7de925242c30 (patch) | |
tree | a83b51da6884e483f78ff85c81f37e9e4e66f064 /fs/ubifs | |
parent | 49d128aa60751a010640f4763d11577e2f508853 (diff) | |
download | linux-6ba87c9b920bea8c2703308d31eb7de925242c30.tar.xz |
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.c | 13 |
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) else { c->need_recovery = 0; ubifs_msg("recovery completed"); + /* GC LEB has to be empty and taken at this point */ + ubifs_assert(c->lst.taken_empty_lebs == 1); } - } + } else + ubifs_assert(c->lst.taken_empty_lebs == 1); - err = dbg_debugfs_init_fs(c); + err = dbg_check_filesystem(c); if (err) goto out_infos; - err = dbg_check_filesystem(c); + err = dbg_debugfs_init_fs(c); if (err) goto out_infos; c->always_chk_crc = 0; - /* GC LEB has to be empty and taken at this point */ - ubifs_assert(c->lst.taken_empty_lebs == 1); ubifs_msg("mounted UBI device %d, volume %d, name \"%s\"", c->vi.ubi_num, c->vi.vol_id, c->vi.name); @@ -1663,7 +1664,7 @@ static void ubifs_remount_ro(struct ubifs_info *c) int i, err; ubifs_assert(!c->need_recovery); - ubifs_assert(!c->ro_media); + ubifs_assert(!(c->vfs_sb->s_flags & MS_RDONLY)); commit_on_unmount(c); mutex_lock(&c->umount_mutex); |