diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2005-09-06 18:18:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:50 -0400 |
commit | a5e3985fa014029eb6795664c704953720cc7f7d (patch) | |
tree | d6e198ba756a55080c96d51a91d5112c3c7866e1 /fs | |
parent | 8c702e16207c70119d03df924de35f8c3629a5c4 (diff) |
[PATCH] hfs: remove debug code
This removes some old debug code, which is no longer needed.
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')
-rw-r--r-- | fs/hfs/bnode.c | 21 | ||||
-rw-r--r-- | fs/hfsplus/bnode.c | 21 |
2 files changed, 2 insertions, 40 deletions
diff --git a/fs/hfs/bnode.c b/fs/hfs/bnode.c index a096c5a56664..3d5cdc6847c0 100644 --- a/fs/hfs/bnode.c +++ b/fs/hfs/bnode.c | |||
@@ -13,8 +13,6 @@ | |||
13 | 13 | ||
14 | #include "btree.h" | 14 | #include "btree.h" |
15 | 15 | ||
16 | #define REF_PAGES 0 | ||
17 | |||
18 | void hfs_bnode_read(struct hfs_bnode *node, void *buf, | 16 | void hfs_bnode_read(struct hfs_bnode *node, void *buf, |
19 | int off, int len) | 17 | int off, int len) |
20 | { | 18 | { |
@@ -289,9 +287,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) | |||
289 | page_cache_release(page); | 287 | page_cache_release(page); |
290 | goto fail; | 288 | goto fail; |
291 | } | 289 | } |
292 | #if !REF_PAGES | ||
293 | page_cache_release(page); | 290 | page_cache_release(page); |
294 | #endif | ||
295 | node->page[i] = page; | 291 | node->page[i] = page; |
296 | } | 292 | } |
297 | 293 | ||
@@ -449,13 +445,6 @@ void hfs_bnode_get(struct hfs_bnode *node) | |||
449 | { | 445 | { |
450 | if (node) { | 446 | if (node) { |
451 | atomic_inc(&node->refcnt); | 447 | atomic_inc(&node->refcnt); |
452 | #if REF_PAGES | ||
453 | { | ||
454 | int i; | ||
455 | for (i = 0; i < node->tree->pages_per_bnode; i++) | ||
456 | get_page(node->page[i]); | ||
457 | } | ||
458 | #endif | ||
459 | dprint(DBG_BNODE_REFS, "get_node(%d:%d): %d\n", | 448 | dprint(DBG_BNODE_REFS, "get_node(%d:%d): %d\n", |
460 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); | 449 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); |
461 | } | 450 | } |
@@ -472,20 +461,12 @@ void hfs_bnode_put(struct hfs_bnode *node) | |||
472 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); | 461 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); |
473 | if (!atomic_read(&node->refcnt)) | 462 | if (!atomic_read(&node->refcnt)) |
474 | BUG(); | 463 | BUG(); |
475 | if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) { | 464 | if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) |
476 | #if REF_PAGES | ||
477 | for (i = 0; i < tree->pages_per_bnode; i++) | ||
478 | put_page(node->page[i]); | ||
479 | #endif | ||
480 | return; | 465 | return; |
481 | } | ||
482 | for (i = 0; i < tree->pages_per_bnode; i++) { | 466 | for (i = 0; i < tree->pages_per_bnode; i++) { |
483 | if (!node->page[i]) | 467 | if (!node->page[i]) |
484 | continue; | 468 | continue; |
485 | mark_page_accessed(node->page[i]); | 469 | mark_page_accessed(node->page[i]); |
486 | #if REF_PAGES | ||
487 | put_page(node->page[i]); | ||
488 | #endif | ||
489 | } | 470 | } |
490 | 471 | ||
491 | if (test_bit(HFS_BNODE_DELETED, &node->flags)) { | 472 | if (test_bit(HFS_BNODE_DELETED, &node->flags)) { |
diff --git a/fs/hfsplus/bnode.c b/fs/hfsplus/bnode.c index 8868d3b766fd..b85abc6e6f83 100644 --- a/fs/hfsplus/bnode.c +++ b/fs/hfsplus/bnode.c | |||
@@ -18,8 +18,6 @@ | |||
18 | #include "hfsplus_fs.h" | 18 | #include "hfsplus_fs.h" |
19 | #include "hfsplus_raw.h" | 19 | #include "hfsplus_raw.h" |
20 | 20 | ||
21 | #define REF_PAGES 0 | ||
22 | |||
23 | /* Copy a specified range of bytes from the raw data of a node */ | 21 | /* Copy a specified range of bytes from the raw data of a node */ |
24 | void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len) | 22 | void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len) |
25 | { | 23 | { |
@@ -450,9 +448,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid) | |||
450 | page_cache_release(page); | 448 | page_cache_release(page); |
451 | goto fail; | 449 | goto fail; |
452 | } | 450 | } |
453 | #if !REF_PAGES | ||
454 | page_cache_release(page); | 451 | page_cache_release(page); |
455 | #endif | ||
456 | node->page[i] = page; | 452 | node->page[i] = page; |
457 | } | 453 | } |
458 | 454 | ||
@@ -612,13 +608,6 @@ void hfs_bnode_get(struct hfs_bnode *node) | |||
612 | { | 608 | { |
613 | if (node) { | 609 | if (node) { |
614 | atomic_inc(&node->refcnt); | 610 | atomic_inc(&node->refcnt); |
615 | #if REF_PAGES | ||
616 | { | ||
617 | int i; | ||
618 | for (i = 0; i < node->tree->pages_per_bnode; i++) | ||
619 | get_page(node->page[i]); | ||
620 | } | ||
621 | #endif | ||
622 | dprint(DBG_BNODE_REFS, "get_node(%d:%d): %d\n", | 611 | dprint(DBG_BNODE_REFS, "get_node(%d:%d): %d\n", |
623 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); | 612 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); |
624 | } | 613 | } |
@@ -635,20 +624,12 @@ void hfs_bnode_put(struct hfs_bnode *node) | |||
635 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); | 624 | node->tree->cnid, node->this, atomic_read(&node->refcnt)); |
636 | if (!atomic_read(&node->refcnt)) | 625 | if (!atomic_read(&node->refcnt)) |
637 | BUG(); | 626 | BUG(); |
638 | if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) { | 627 | if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) |
639 | #if REF_PAGES | ||
640 | for (i = 0; i < tree->pages_per_bnode; i++) | ||
641 | put_page(node->page[i]); | ||
642 | #endif | ||
643 | return; | 628 | return; |
644 | } | ||
645 | for (i = 0; i < tree->pages_per_bnode; i++) { | 629 | for (i = 0; i < tree->pages_per_bnode; i++) { |
646 | if (!node->page[i]) | 630 | if (!node->page[i]) |
647 | continue; | 631 | continue; |
648 | mark_page_accessed(node->page[i]); | 632 | mark_page_accessed(node->page[i]); |
649 | #if REF_PAGES | ||
650 | put_page(node->page[i]); | ||
651 | #endif | ||
652 | } | 633 | } |
653 | 634 | ||
654 | if (test_bit(HFS_BNODE_DELETED, &node->flags)) { | 635 | if (test_bit(HFS_BNODE_DELETED, &node->flags)) { |