UBIFS: print debugging messages properly
We cannot use ubifs_err() macro with DBGKEY() and DBGKEY1(), because this is racy and holding dbg_lock is needed. Use dbg_err() instead, which does have the lock held. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
@@ -1010,9 +1010,9 @@ static int dbg_check_key_order(struct ubifs_info *c, struct ubifs_zbranch *zbr1,
|
|||||||
err = 1;
|
err = 1;
|
||||||
key_read(c, &dent1->key, &key);
|
key_read(c, &dent1->key, &key);
|
||||||
if (keys_cmp(c, &zbr1->key, &key)) {
|
if (keys_cmp(c, &zbr1->key, &key)) {
|
||||||
ubifs_err("1st entry at %d:%d has key %s", zbr1->lnum,
|
dbg_err("1st entry at %d:%d has key %s", zbr1->lnum,
|
||||||
zbr1->offs, DBGKEY(&key));
|
zbr1->offs, DBGKEY(&key));
|
||||||
ubifs_err("but it should have key %s according to tnc",
|
dbg_err("but it should have key %s according to tnc",
|
||||||
DBGKEY(&zbr1->key));
|
DBGKEY(&zbr1->key));
|
||||||
dbg_dump_node(c, dent1);
|
dbg_dump_node(c, dent1);
|
||||||
goto out_free;
|
goto out_free;
|
||||||
@@ -1020,9 +1020,9 @@ static int dbg_check_key_order(struct ubifs_info *c, struct ubifs_zbranch *zbr1,
|
|||||||
|
|
||||||
key_read(c, &dent2->key, &key);
|
key_read(c, &dent2->key, &key);
|
||||||
if (keys_cmp(c, &zbr2->key, &key)) {
|
if (keys_cmp(c, &zbr2->key, &key)) {
|
||||||
ubifs_err("2nd entry at %d:%d has key %s", zbr1->lnum,
|
dbg_err("2nd entry at %d:%d has key %s", zbr1->lnum,
|
||||||
zbr1->offs, DBGKEY(&key));
|
zbr1->offs, DBGKEY(&key));
|
||||||
ubifs_err("but it should have key %s according to tnc",
|
dbg_err("but it should have key %s according to tnc",
|
||||||
DBGKEY(&zbr2->key));
|
DBGKEY(&zbr2->key));
|
||||||
dbg_dump_node(c, dent2);
|
dbg_dump_node(c, dent2);
|
||||||
goto out_free;
|
goto out_free;
|
||||||
@@ -1037,9 +1037,9 @@ static int dbg_check_key_order(struct ubifs_info *c, struct ubifs_zbranch *zbr1,
|
|||||||
goto out_free;
|
goto out_free;
|
||||||
}
|
}
|
||||||
if (cmp == 0 && nlen1 == nlen2)
|
if (cmp == 0 && nlen1 == nlen2)
|
||||||
ubifs_err("2 xent/dent nodes with the same name");
|
dbg_err("2 xent/dent nodes with the same name");
|
||||||
else
|
else
|
||||||
ubifs_err("bad order of colliding key %s",
|
dbg_err("bad order of colliding key %s",
|
||||||
DBGKEY(&key));
|
DBGKEY(&key));
|
||||||
|
|
||||||
ubifs_msg("first node at %d:%d\n", zbr1->lnum, zbr1->offs);
|
ubifs_msg("first node at %d:%d\n", zbr1->lnum, zbr1->offs);
|
||||||
|
Reference in New Issue
Block a user