Skip to content

Commit

Permalink
UBIFS: fix assertion warning
Browse files Browse the repository at this point in the history
This patch fixes the following false assertion warning:

UBIFS assert failed in data_nodes_cmp at 130 (pid 15107)

The assertion was wrong because it did not take into account that the
node can be an xentry.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Aug 30, 2010
1 parent efe1881 commit e3408ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ubifs/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ int nondata_nodes_cmp(void *priv, struct list_head *a, struct list_head *b)
if (typeb == UBIFS_INO_KEY)
return 1;

ubifs_assert(typea == UBIFS_DENT_KEY && typeb == UBIFS_DENT_KEY);
ubifs_assert(typea == UBIFS_DENT_KEY || typea == UBIFS_XENT_KEY);
ubifs_assert(typeb == UBIFS_DENT_KEY || typeb == UBIFS_XENT_KEY);
inuma = key_inum(c, &sa->key);
inumb = key_inum(c, &sb->key);

Expand Down

0 comments on commit e3408ad

Please sign in to comment.