Skip to content

Commit

Permalink
UBIFS: correct key comparison
Browse files Browse the repository at this point in the history
The comparison was working, but more by accident than design.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
  • Loading branch information
Adrian Hunter authored and Artem Bityutskiy committed Sep 30, 2008
1 parent 625bf37 commit 2094c33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ubifs/tnc_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 2094c33

Please sign in to comment.