summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-03-15 17:20:22 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-03-15 17:20:22 +0200
commitb221337ae4ef9baff84d6d5ecb806e79a5597329 (patch)
tree5dafb3b31751fee5c50656be2157bc9865732f7d /fs/ubifs
parentf55aa59106b66cd547c8f296e0b3430ad76554c5 (diff)
UBIFS: fix bogus assertion
Empty journal head LEBs are accounted as taken empty as well, so the GC LEB does not have to be the only taken empty LEB when nounting/remounting. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/super.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 1182b66a549..03cd9ac4dcb 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1318,11 +1318,15 @@ 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);
+ /*
+ * GC LEB has to be empty and taken at this point. But
+ * the journal head LEBs may also be accounted as
+ * "empty taken" if they are empty.
+ */
+ ubifs_assert(c->lst.taken_empty_lebs > 0);
}
} else
- ubifs_assert(c->lst.taken_empty_lebs == 1);
+ ubifs_assert(c->lst.taken_empty_lebs > 0);
err = dbg_check_filesystem(c);
if (err)
@@ -1775,7 +1779,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
c->bu.buf = NULL;
}
- ubifs_assert(c->lst.taken_empty_lebs == 1);
+ ubifs_assert(c->lst.taken_empty_lebs > 0);
return 0;
}