aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/btree.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-30 18:27:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:05 -0400
commitd614267329f2bee7a082ed8781c581c0f3aaa808 (patch)
treeedade57808a2a2e327daf83991a31a76660b7a41 /fs/hfsplus/btree.c
parentc2b3e1f76e5c90215bc7f740b376c0220eb8a8e3 (diff)
hfs/hfsplus: convert printks to pr_<level>
Use a more current logging style. Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt hfsplus now uses "hfsplus: " for all messages. Coalesce formats. Prefix debugging messages too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/btree.c')
-rw-r--r--fs/hfsplus/btree.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/hfsplus/btree.c b/fs/hfsplus/btree.c
index c2fa4bf5629c..0c6540c91167 100644
--- a/fs/hfsplus/btree.c
+++ b/fs/hfsplus/btree.c
@@ -40,8 +40,7 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
40 tree->inode = inode; 40 tree->inode = inode;
41 41
42 if (!HFSPLUS_I(tree->inode)->first_blocks) { 42 if (!HFSPLUS_I(tree->inode)->first_blocks) {
43 printk(KERN_ERR 43 pr_err("invalid btree extent records (0 size)\n");
44 "hfs: invalid btree extent records (0 size).\n");
45 goto free_inode; 44 goto free_inode;
46 } 45 }
47 46
@@ -68,12 +67,12 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
68 switch (id) { 67 switch (id) {
69 case HFSPLUS_EXT_CNID: 68 case HFSPLUS_EXT_CNID:
70 if (tree->max_key_len != HFSPLUS_EXT_KEYLEN - sizeof(u16)) { 69 if (tree->max_key_len != HFSPLUS_EXT_KEYLEN - sizeof(u16)) {
71 printk(KERN_ERR "hfs: invalid extent max_key_len %d\n", 70 pr_err("invalid extent max_key_len %d\n",
72 tree->max_key_len); 71 tree->max_key_len);
73 goto fail_page; 72 goto fail_page;
74 } 73 }
75 if (tree->attributes & HFS_TREE_VARIDXKEYS) { 74 if (tree->attributes & HFS_TREE_VARIDXKEYS) {
76 printk(KERN_ERR "hfs: invalid extent btree flag\n"); 75 pr_err("invalid extent btree flag\n");
77 goto fail_page; 76 goto fail_page;
78 } 77 }
79 78
@@ -81,12 +80,12 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
81 break; 80 break;
82 case HFSPLUS_CAT_CNID: 81 case HFSPLUS_CAT_CNID:
83 if (tree->max_key_len != HFSPLUS_CAT_KEYLEN - sizeof(u16)) { 82 if (tree->max_key_len != HFSPLUS_CAT_KEYLEN - sizeof(u16)) {
84 printk(KERN_ERR "hfs: invalid catalog max_key_len %d\n", 83 pr_err("invalid catalog max_key_len %d\n",
85 tree->max_key_len); 84 tree->max_key_len);
86 goto fail_page; 85 goto fail_page;
87 } 86 }
88 if (!(tree->attributes & HFS_TREE_VARIDXKEYS)) { 87 if (!(tree->attributes & HFS_TREE_VARIDXKEYS)) {
89 printk(KERN_ERR "hfs: invalid catalog btree flag\n"); 88 pr_err("invalid catalog btree flag\n");
90 goto fail_page; 89 goto fail_page;
91 } 90 }
92 91
@@ -100,19 +99,19 @@ struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id)
100 break; 99 break;
101 case HFSPLUS_ATTR_CNID: 100 case HFSPLUS_ATTR_CNID:
102 if (tree->max_key_len != HFSPLUS_ATTR_KEYLEN - sizeof(u16)) { 101 if (tree->max_key_len != HFSPLUS_ATTR_KEYLEN - sizeof(u16)) {
103 printk(KERN_ERR "hfs: invalid attributes max_key_len %d\n", 102 pr_err("invalid attributes max_key_len %d\n",
104 tree->max_key_len); 103 tree->max_key_len);
105 goto fail_page; 104 goto fail_page;
106 } 105 }
107 tree->keycmp = hfsplus_attr_bin_cmp_key; 106 tree->keycmp = hfsplus_attr_bin_cmp_key;
108 break; 107 break;
109 default: 108 default:
110 printk(KERN_ERR "hfs: unknown B*Tree requested\n"); 109 pr_err("unknown B*Tree requested\n");
111 goto fail_page; 110 goto fail_page;
112 } 111 }
113 112
114 if (!(tree->attributes & HFS_TREE_BIGKEYS)) { 113 if (!(tree->attributes & HFS_TREE_BIGKEYS)) {
115 printk(KERN_ERR "hfs: invalid btree flag\n"); 114 pr_err("invalid btree flag\n");
116 goto fail_page; 115 goto fail_page;
117 } 116 }
118 117
@@ -155,7 +154,7 @@ void hfs_btree_close(struct hfs_btree *tree)
155 while ((node = tree->node_hash[i])) { 154 while ((node = tree->node_hash[i])) {
156 tree->node_hash[i] = node->next_hash; 155 tree->node_hash[i] = node->next_hash;
157 if (atomic_read(&node->refcnt)) 156 if (atomic_read(&node->refcnt))
158 printk(KERN_CRIT "hfs: node %d:%d " 157 pr_crit("node %d:%d "
159 "still has %d user(s)!\n", 158 "still has %d user(s)!\n",
160 node->tree->cnid, node->this, 159 node->tree->cnid, node->this,
161 atomic_read(&node->refcnt)); 160 atomic_read(&node->refcnt));
@@ -345,7 +344,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
345 hfs_bnode_put(node); 344 hfs_bnode_put(node);
346 if (!i) { 345 if (!i) {
347 /* panic */; 346 /* panic */;
348 printk(KERN_CRIT "hfs: unable to free bnode %u. " 347 pr_crit("unable to free bnode %u. "
349 "bmap not found!\n", 348 "bmap not found!\n",
350 node->this); 349 node->this);
351 return; 350 return;
@@ -355,7 +354,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
355 return; 354 return;
356 if (node->type != HFS_NODE_MAP) { 355 if (node->type != HFS_NODE_MAP) {
357 /* panic */; 356 /* panic */;
358 printk(KERN_CRIT "hfs: invalid bmap found! " 357 pr_crit("invalid bmap found! "
359 "(%u,%d)\n", 358 "(%u,%d)\n",
360 node->this, node->type); 359 node->this, node->type);
361 hfs_bnode_put(node); 360 hfs_bnode_put(node);
@@ -370,7 +369,7 @@ void hfs_bmap_free(struct hfs_bnode *node)
370 m = 1 << (~nidx & 7); 369 m = 1 << (~nidx & 7);
371 byte = data[off]; 370 byte = data[off];
372 if (!(byte & m)) { 371 if (!(byte & m)) {
373 printk(KERN_CRIT "hfs: trying to free free bnode " 372 pr_crit("trying to free free bnode "
374 "%u(%d)\n", 373 "%u(%d)\n",
375 node->this, node->type); 374 node->this, node->type);
376 kunmap(page); 375 kunmap(page);