From: Dan Carpenter Date: Sat, 9 Jun 2012 09:08:23 +0000 (+0300) Subject: UBIFS: fix assertion X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1cfb7271076a265b7c2cbbf9cf5c2ae060a24385;p=linux-beck.git UBIFS: fix assertion 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 Signed-off-by: Artem Bityutskiy --- diff --git a/fs/ubifs/find.c b/fs/ubifs/find.c index 2559d174e004..28ec13af28d9 100644 --- a/fs/ubifs/find.c +++ b/fs/ubifs/find.c @@ -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; }