aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/btree.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-01-18 20:43:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 22:20:22 -0500
commit634725a92938b0f282b17cec0b007dca77adebd2 (patch)
treec4dacf0c74ae3d322c37c010ee5cada2280eccca /fs/hfsplus/btree.c
parent5131cf154ad1c6e584efa58d17a469d0b80f49bd (diff)
[PATCH] hfs: cleanup HFS+ prints
Add the log level and a "hfs: " prefix to all kernel prints. (HFS and HFS+ will use the same prefix, as they share some code and could be merged at some point.) Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hfsplus/btree.c')
-rw-r--r--fs/hfsplus/btree.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index 44326aa2bd34..671290663838 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -39,7 +39,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
39 } else if (id == HFSPLUS_CAT_CNID) { 39 } else if (id == HFSPLUS_CAT_CNID) {
40 tree->keycmp = hfsplus_cat_cmp_key; 40 tree->keycmp = hfsplus_cat_cmp_key;
41 } else { 41 } else {
42 printk("HFS+-fs: unknown B*Tree requested\n"); 42 printk(KERN_ERR "hfs: unknown B*Tree requested\n");
43 goto free_tree; 43 goto free_tree;
44 } 44 }
45 tree->inode = iget(sb, id); 45 tree->inode = iget(sb, id);
@@ -99,7 +99,7 @@ void hfs_btree_close(struct hfs_btree *tree)
99 while ((node = tree->node_hash[i])) { 99 while ((node = tree->node_hash[i])) {
100 tree->node_hash[i] = node->next_hash; 100 tree->node_hash[i] = node->next_hash;
101 if (atomic_read(&node->refcnt)) 101 if (atomic_read(&node->refcnt))
102 printk("HFS+: node %d:%d still has %d user(s)!\n", 102 printk(KERN_CRIT "hfs: node %d:%d still has %d user(s)!\n",
103 node->tree->cnid, node->this, atomic_read(&node->refcnt)); 103 node->tree->cnid, node->this, atomic_read(&node->refcnt));
104 hfs_bnode_free(node); 104 hfs_bnode_free(node);
105 tree->node_hash_cnt--; 105 tree->node_hash_cnt--;
@@ -223,10 +223,6 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
223 tree->free_nodes--; 223 tree->free_nodes--;
224 mark_inode_dirty(tree->inode); 224 mark_inode_dirty(tree->inode);
225 hfs_bnode_put(node); 225 hfs_bnode_put(node);
226 if (!idx) {
227 printk("unexpected idx %u (%u)\n", idx, node->this);
228 BUG();
229 }
230 return hfs_bnode_create(tree, idx); 226 return hfs_bnode_create(tree, idx);
231 } 227 }
232 } 228 }
@@ -242,7 +238,7 @@ struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
242 kunmap(*pagep); 238 kunmap(*pagep);
243 nidx = node->next; 239 nidx = node->next;
244 if (!nidx) { 240 if (!nidx) {
245 printk("create new bmap node...\n"); 241 printk(KERN_DEBUG "hfs: create new bmap node...\n");
246 next_node = hfs_bmap_new_bmap(node, idx); 242 next_node = hfs_bmap_new_bmap(node, idx);
247 } else 243 } else
248 next_node = hfs_bnode_find(tree, nidx); 244 next_node = hfs_bnode_find(tree, nidx);
@@ -284,7 +280,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
284 hfs_bnode_put(node); 280 hfs_bnode_put(node);
285 if (!i) { 281 if (!i) {
286 /* panic */; 282 /* panic */;
287 printk("HFS: unable to free bnode %u. bmap not found!\n", node->this); 283 printk(KERN_CRIT "hfs: unable to free bnode %u. bmap not found!\n", node->this);
288 return; 284 return;
289 } 285 }
290 node = hfs_bnode_find(tree, i); 286 node = hfs_bnode_find(tree, i);
@@ -292,7 +288,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
292 return; 288 return;
293 if (node->type != HFS_NODE_MAP) { 289 if (node->type != HFS_NODE_MAP) {
294 /* panic */; 290 /* panic */;
295 printk("HFS: invalid bmap found! (%u,%d)\n", node->this, node->type); 291 printk(KERN_CRIT "hfs: invalid bmap found! (%u,%d)\n", node->this, node->type);
296 hfs_bnode_put(node); 292 hfs_bnode_put(node);
297 return; 293 return;
298 } 294 }
@@ -305,7 +301,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
305 m = 1 << (~nidx & 7); 301 m = 1 << (~nidx & 7);
306 byte = data[off]; 302 byte = data[off];
307 if (!(byte & m)) { 303 if (!(byte & m)) {
308 printk("HFS: trying to free free bnode %u(%d)\n", node->this, node->type); 304 printk(KERN_CRIT "hfs: trying to free free bnode %u(%d)\n", node->this, node->type);
309 kunmap(page); 305 kunmap(page);
310 hfs_bnode_put(node); 306 hfs_bnode_put(node);
311 return; 307 return;