aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-03-15 11:20:22 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-03-15 11:20:22 -0400
commitb221337ae4ef9baff84d6d5ecb806e79a5597329 (patch)
tree5dafb3b31751fee5c50656be2157bc9865732f7d /fs
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')
-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 1182b66a5491..03cd9ac4dcb2 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1318,11 +1318,15 @@ static int mount_ubifs(struct ubifs_info *c)
1318 else { 1318 else {
1319 c->need_recovery = 0; 1319 c->need_recovery = 0;
1320 ubifs_msg("recovery completed"); 1320 ubifs_msg("recovery completed");
1321 /* GC LEB has to be empty and taken at this point */ 1321 /*
1322 ubifs_assert(c->lst.taken_empty_lebs == 1); 1322 * GC LEB has to be empty and taken at this point. But
1323 * the journal head LEBs may also be accounted as
1324 * "empty taken" if they are empty.
1325 */
1326 ubifs_assert(c->lst.taken_empty_lebs > 0);
1323 } 1327 }
1324 } else 1328 } else
1325 ubifs_assert(c->lst.taken_empty_lebs == 1); 1329 ubifs_assert(c->lst.taken_empty_lebs > 0);
1326 1330
1327 err = dbg_check_filesystem(c); 1331 err = dbg_check_filesystem(c);
1328 if (err) 1332 if (err)
@@ -1775,7 +1779,7 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data)
1775 c->bu.buf = NULL; 1779 c->bu.buf = NULL;
1776 } 1780 }
1777 1781
1778 ubifs_assert(c->lst.taken_empty_lebs == 1); 1782 ubifs_assert(c->lst.taken_empty_lebs > 0);
1779 return 0; 1783 return 0;
1780} 1784}
1781 1785