aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/hfsplus/bnode.c18
-rw-r--r--fs/hfsplus/extents.c2
-rw-r--r--fs/hfsplus/hfsplus_fs.h9
3 files changed, 16 insertions, 13 deletions
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c
index cf7dc8dac766..c8f4ea4bb5ed 100644
--- a/fs/hfsplus/bnode.c
+++ b/fs/hfsplus/bnode.c
@@ -42,7 +42,7 @@ void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len)
42u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off) 42u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off)
43{ 43{
44 __be16 data; 44 __be16 data;
45 // optimize later... 45 /* TODO: optimize later... */
46 hfs_bnode_read(node, &data, off, 2); 46 hfs_bnode_read(node, &data, off, 2);
47 return be16_to_cpu(data); 47 return be16_to_cpu(data);
48} 48}
@@ -50,7 +50,7 @@ u16 hfs_bnode_read_u16(struct hfs_bnode *node, int off)
50u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off) 50u8 hfs_bnode_read_u8(struct hfs_bnode *node, int off)
51{ 51{
52 u8 data; 52 u8 data;
53 // optimize later... 53 /* TODO: optimize later... */
54 hfs_bnode_read(node, &data, off, 1); 54 hfs_bnode_read(node, &data, off, 1);
55 return data; 55 return data;
56} 56}
@@ -96,7 +96,7 @@ void hfs_bnode_write(struct hfs_bnode *node, void *buf, int off, int len)
96void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data) 96void hfs_bnode_write_u16(struct hfs_bnode *node, int off, u16 data)
97{ 97{
98 __be16 v = cpu_to_be16(data); 98 __be16 v = cpu_to_be16(data);
99 // optimize later... 99 /* TODO: optimize later... */
100 hfs_bnode_write(node, &v, off, 2); 100 hfs_bnode_write(node, &v, off, 2);
101} 101}
102 102
@@ -362,7 +362,7 @@ void hfs_bnode_unlink(struct hfs_bnode *node)
362 } else if (node->type == HFS_NODE_LEAF) 362 } else if (node->type == HFS_NODE_LEAF)
363 tree->leaf_tail = node->prev; 363 tree->leaf_tail = node->prev;
364 364
365 // move down? 365 /* move down? */
366 if (!node->prev && !node->next) { 366 if (!node->prev && !node->next) {
367 dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n"); 367 dprint(DBG_BNODE_MOD, "hfs_btree_del_level\n");
368 } 368 }
@@ -569,11 +569,13 @@ node_error:
569 569
570void hfs_bnode_free(struct hfs_bnode *node) 570void hfs_bnode_free(struct hfs_bnode *node)
571{ 571{
572 //int i; 572#if 0
573 int i;
573 574
574 //for (i = 0; i < node->tree->pages_per_bnode; i++) 575 for (i = 0; i < node->tree->pages_per_bnode; i++)
575 // if (node->page[i]) 576 if (node->page[i])
576 // page_cache_release(node->page[i]); 577 page_cache_release(node->page[i]);
578#endif
577 kfree(node); 579 kfree(node);
578} 580}
579 581
diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
index 1ae2fe5cfa74..4b693b5b6230 100644
--- a/fs/hfsplus/extents.c
+++ b/fs/hfsplus/extents.c
@@ -399,7 +399,7 @@ int hfsplus_file_extend(struct inode *inode)
399 399
400 if (sbi->alloc_file->i_size * 8 < 400 if (sbi->alloc_file->i_size * 8 <
401 sbi->total_blocks - sbi->free_blocks + 8) { 401 sbi->total_blocks - sbi->free_blocks + 8) {
402 // extend alloc file 402 /* extend alloc file */
403 printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n", 403 printk(KERN_ERR "hfs: extend alloc file! (%Lu,%u,%u)\n",
404 sbi->alloc_file->i_size * 8, 404 sbi->alloc_file->i_size * 8,
405 sbi->total_blocks, sbi->free_blocks); 405 sbi->total_blocks, sbi->free_blocks);
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h
index c4abec167826..a15e1c11e820 100644
--- a/fs/hfsplus/hfsplus_fs.h
+++ b/fs/hfsplus/hfsplus_fs.h
@@ -23,9 +23,11 @@
23#define DBG_EXTENT 0x00000020 23#define DBG_EXTENT 0x00000020
24#define DBG_BITMAP 0x00000040 24#define DBG_BITMAP 0x00000040
25 25
26//#define DBG_MASK (DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD) 26#if 0
27//#define DBG_MASK (DBG_BNODE_MOD|DBG_CAT_MOD|DBG_INODE) 27#define DBG_MASK (DBG_EXTENT|DBG_INODE|DBG_BNODE_MOD)
28//#define DBG_MASK (DBG_CAT_MOD|DBG_BNODE_REFS|DBG_INODE|DBG_EXTENT) 28#define DBG_MASK (DBG_BNODE_MOD|DBG_CAT_MOD|DBG_INODE)
29#define DBG_MASK (DBG_CAT_MOD|DBG_BNODE_REFS|DBG_INODE|DBG_EXTENT)
30#endif
29#define DBG_MASK (0) 31#define DBG_MASK (0)
30 32
31#define dprint(flg, fmt, args...) \ 33#define dprint(flg, fmt, args...) \
@@ -62,7 +64,6 @@ struct hfs_btree {
62 unsigned int max_key_len; 64 unsigned int max_key_len;
63 unsigned int depth; 65 unsigned int depth;
64 66
65 //unsigned int map1_size, map_size;
66 struct mutex tree_lock; 67 struct mutex tree_lock;
67 68
68 unsigned int pages_per_bnode; 69 unsigned int pages_per_bnode;