summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/tnc_misc.c
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2008-09-05 14:20:04 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-09-30 10:12:57 +0200
commit2094c334fdebbcceddf21f97cb16b144707af56e (patch)
treeee73b39f13056dd4f920b7512e24ae5833c3c17e /fs/ubifs/tnc_misc.c
parentUBIFS: use bit-fields when possible (diff)
downloadlinux-2094c334fdebbcceddf21f97cb16b144707af56e.tar.xz
linux-2094c334fdebbcceddf21f97cb16b144707af56e.zip
UBIFS: correct key comparison
The comparison was working, but more by accident than design. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Diffstat (limited to 'fs/ubifs/tnc_misc.c')
-rw-r--r--fs/ubifs/tnc_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/tnc_misc.c b/fs/ubifs/tnc_misc.c
index a25c1cc1f8d9..b48db999903e 100644
--- a/fs/ubifs/tnc_misc.c
+++ b/fs/ubifs/tnc_misc.c
@@ -480,8 +480,8 @@ int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
}
/* Make sure the key of the read node is correct */
- key_read(c, key, &key1);
- if (memcmp(node + UBIFS_KEY_OFFSET, &key1, c->key_len)) {
+ key_read(c, node + UBIFS_KEY_OFFSET, &key1);
+ if (!keys_eq(c, key, &key1)) {
ubifs_err("bad key in node at LEB %d:%d",
zbr->lnum, zbr->offs);
dbg_tnc("looked for key %s found node's key %s",