Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7463
b: refs/heads/master
c: a5e3985
h: refs/heads/master
i:
  7461: 290130a
  7459: d17ffc7
  7455: a553a0e
v: v3
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Sep 7, 2005
1 parent 5e5be1e commit bd58b86
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 41 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c702e16207c70119d03df924de35f8c3629a5c4
refs/heads/master: a5e3985fa014029eb6795664c704953720cc7f7d
21 changes: 1 addition & 20 deletions trunk/fs/hfs/bnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

#include "btree.h"

#define REF_PAGES 0

void hfs_bnode_read(struct hfs_bnode *node, void *buf,
int off, int len)
{
Expand Down Expand Up @@ -289,9 +287,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
page_cache_release(page);
goto fail;
}
#if !REF_PAGES
page_cache_release(page);
#endif
node->page[i] = page;
}

Expand Down Expand Up @@ -449,13 +445,6 @@ void hfs_bnode_get(struct hfs_bnode *node)
{
if (node) {
atomic_inc(&node->refcnt);
#if REF_PAGES
{
int i;
for (i = 0; i < node->tree->pages_per_bnode; i++)
get_page(node->page[i]);
}
#endif
dprint(DBG_BNODE_REFS, "get_node(%d:%d): %d\n",
node->tree->cnid, node->this, atomic_read(&node->refcnt));
}
Expand All @@ -472,20 +461,12 @@ void hfs_bnode_put(struct hfs_bnode *node)
node->tree->cnid, node->this, atomic_read(&node->refcnt));
if (!atomic_read(&node->refcnt))
BUG();
if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) {
#if REF_PAGES
for (i = 0; i < tree->pages_per_bnode; i++)
put_page(node->page[i]);
#endif
if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
return;
}
for (i = 0; i < tree->pages_per_bnode; i++) {
if (!node->page[i])
continue;
mark_page_accessed(node->page[i]);
#if REF_PAGES
put_page(node->page[i]);
#endif
}

if (test_bit(HFS_BNODE_DELETED, &node->flags)) {
Expand Down
21 changes: 1 addition & 20 deletions trunk/fs/hfsplus/bnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include "hfsplus_fs.h"
#include "hfsplus_raw.h"

#define REF_PAGES 0

/* Copy a specified range of bytes from the raw data of a node */
void hfs_bnode_read(struct hfs_bnode *node, void *buf, int off, int len)
{
Expand Down Expand Up @@ -450,9 +448,7 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)
page_cache_release(page);
goto fail;
}
#if !REF_PAGES
page_cache_release(page);
#endif
node->page[i] = page;
}

Expand Down Expand Up @@ -612,13 +608,6 @@ void hfs_bnode_get(struct hfs_bnode *node)
{
if (node) {
atomic_inc(&node->refcnt);
#if REF_PAGES
{
int i;
for (i = 0; i < node->tree->pages_per_bnode; i++)
get_page(node->page[i]);
}
#endif
dprint(DBG_BNODE_REFS, "get_node(%d:%d): %d\n",
node->tree->cnid, node->this, atomic_read(&node->refcnt));
}
Expand All @@ -635,20 +624,12 @@ void hfs_bnode_put(struct hfs_bnode *node)
node->tree->cnid, node->this, atomic_read(&node->refcnt));
if (!atomic_read(&node->refcnt))
BUG();
if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock)) {
#if REF_PAGES
for (i = 0; i < tree->pages_per_bnode; i++)
put_page(node->page[i]);
#endif
if (!atomic_dec_and_lock(&node->refcnt, &tree->hash_lock))
return;
}
for (i = 0; i < tree->pages_per_bnode; i++) {
if (!node->page[i])
continue;
mark_page_accessed(node->page[i]);
#if REF_PAGES
put_page(node->page[i]);
#endif
}

if (test_bit(HFS_BNODE_DELETED, &node->flags)) {
Expand Down

0 comments on commit bd58b86

Please sign in to comment.