summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-09 12:08:23 +0300
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-06-18 14:17:08 +0300
commit1cfb7271076a265b7c2cbbf9cf5c2ae060a24385 (patch)
treee474f1789c112e8b0acf23cbb42f271eb5e7495b /fs/ubifs
parent485802a6c524e62b5924849dd727ddbb1497cc71 (diff)
downloadlwn-1cfb7271076a265b7c2cbbf9cf5c2ae060a24385.tar.gz
lwn-1cfb7271076a265b7c2cbbf9cf5c2ae060a24385.zip
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 <dan.carpenter@oracle.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/find.c4
1 files changed, 2 insertions, 2 deletions
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;
}