diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-30 10:58:42 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-31 07:13:25 -0500 |
commit | 5d38b3ac78e0e0e420fba134716fc3d20e6b978a (patch) | |
tree | 4a1496fd04e1d7d92b0ce1e1c3f29e443ca46c53 | |
parent | 80736d41f895bc472b2433a1c27fa6d4afe6ca35 (diff) |
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>
-rw-r--r-- | fs/ubifs/debug.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 350fedecc833..792c5a16c182 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -1010,20 +1010,20 @@ static int dbg_check_key_order(struct ubifs_info *c, struct ubifs_zbranch *zbr1, | |||
1010 | err = 1; | 1010 | err = 1; |
1011 | key_read(c, &dent1->key, &key); | 1011 | key_read(c, &dent1->key, &key); |
1012 | if (keys_cmp(c, &zbr1->key, &key)) { | 1012 | if (keys_cmp(c, &zbr1->key, &key)) { |
1013 | ubifs_err("1st entry at %d:%d has key %s", zbr1->lnum, | 1013 | dbg_err("1st entry at %d:%d has key %s", zbr1->lnum, |
1014 | zbr1->offs, DBGKEY(&key)); | 1014 | zbr1->offs, DBGKEY(&key)); |
1015 | ubifs_err("but it should have key %s according to tnc", | 1015 | dbg_err("but it should have key %s according to tnc", |
1016 | DBGKEY(&zbr1->key)); | 1016 | DBGKEY(&zbr1->key)); |
1017 | dbg_dump_node(c, dent1); | 1017 | dbg_dump_node(c, dent1); |
1018 | goto out_free; | 1018 | goto out_free; |
1019 | } | 1019 | } |
1020 | 1020 | ||
1021 | key_read(c, &dent2->key, &key); | 1021 | key_read(c, &dent2->key, &key); |
1022 | if (keys_cmp(c, &zbr2->key, &key)) { | 1022 | if (keys_cmp(c, &zbr2->key, &key)) { |
1023 | ubifs_err("2nd entry at %d:%d has key %s", zbr1->lnum, | 1023 | dbg_err("2nd entry at %d:%d has key %s", zbr1->lnum, |
1024 | zbr1->offs, DBGKEY(&key)); | 1024 | zbr1->offs, DBGKEY(&key)); |
1025 | ubifs_err("but it should have key %s according to tnc", | 1025 | dbg_err("but it should have key %s according to tnc", |
1026 | DBGKEY(&zbr2->key)); | 1026 | DBGKEY(&zbr2->key)); |
1027 | dbg_dump_node(c, dent2); | 1027 | dbg_dump_node(c, dent2); |
1028 | goto out_free; | 1028 | goto out_free; |
1029 | } | 1029 | } |
@@ -1037,9 +1037,9 @@ static int dbg_check_key_order(struct ubifs_info *c, struct ubifs_zbranch *zbr1, | |||
1037 | goto out_free; | 1037 | goto out_free; |
1038 | } | 1038 | } |
1039 | if (cmp == 0 && nlen1 == nlen2) | 1039 | if (cmp == 0 && nlen1 == nlen2) |
1040 | ubifs_err("2 xent/dent nodes with the same name"); | 1040 | dbg_err("2 xent/dent nodes with the same name"); |
1041 | else | 1041 | else |
1042 | ubifs_err("bad order of colliding key %s", | 1042 | dbg_err("bad order of colliding key %s", |
1043 | DBGKEY(&key)); | 1043 | DBGKEY(&key)); |
1044 | 1044 | ||
1045 | ubifs_msg("first node at %d:%d\n", zbr1->lnum, zbr1->offs); | 1045 | ubifs_msg("first node at %d:%d\n", zbr1->lnum, zbr1->offs); |