Skip to content

Commit

Permalink
UBIFS: fix assertion
Browse files Browse the repository at this point in the history
The asserts here never check anything because it uses '|' instead of
'&'.  Now if the flags are not set it prints a warning a a stack trace.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Dan Carpenter authored and Artem Bityutskiy committed Jun 18, 2012
1 parent 485802a commit 1cfb727
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ubifs/find.c
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,8 @@ static int find_dirtiest_idx_leb(struct ubifs_info *c)
}
dbg_find("LEB %d, dirty %d and free %d flags %#x", lp->lnum, lp->dirty,
lp->free, lp->flags);
ubifs_assert(lp->flags | LPROPS_TAKEN);
ubifs_assert(lp->flags | LPROPS_INDEX);
ubifs_assert(lp->flags & LPROPS_TAKEN);
ubifs_assert(lp->flags & LPROPS_INDEX);
return lnum;
}

Expand Down

0 comments on commit 1cfb727

Please sign in to comment.