summaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-06-09 11:08:23 +0200
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-06-18 13:17:08 +0200
commit1cfb7271076a265b7c2cbbf9cf5c2ae060a24385 (patch)
treee474f1789c112e8b0acf23cbb42f271eb5e7495b /fs/ubifs
parentLinux 3.5-rc3 (diff)
downloadlinux-1cfb7271076a265b7c2cbbf9cf5c2ae060a24385.tar.xz
linux-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;
}