Skip to content

Commit 6a258f7

Browse files
Colin Ian Kingrichardweinberger
authored andcommitted
ubifs: Fix cut and paste error on sb type comparisons
The check for the bad node type of sb->type is checking sa->type and not sb-type. This looks like a cut and paste error. Fix this. Detected by PVS-Studio, warning: V581 Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 8a14358 commit 6a258f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ubifs/debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,8 +2391,8 @@ int dbg_check_nondata_nodes_order(struct ubifs_info *c, struct list_head *head)
23912391
ubifs_dump_node(c, sa->node);
23922392
return -EINVAL;
23932393
}
2394-
if (sa->type != UBIFS_INO_NODE && sa->type != UBIFS_DENT_NODE &&
2395-
sa->type != UBIFS_XENT_NODE) {
2394+
if (sb->type != UBIFS_INO_NODE && sb->type != UBIFS_DENT_NODE &&
2395+
sb->type != UBIFS_XENT_NODE) {
23962396
ubifs_err(c, "bad node type %d", sb->type);
23972397
ubifs_dump_node(c, sb->node);
23982398
return -EINVAL;

0 commit comments

Comments
 (0)