git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
hfs
/
btree.c
diff --git
a/fs/hfs/btree.c
b/fs/hfs/btree.c
index
394725e
..
5fd0ed7
100644
(file)
--- a/
fs/hfs/btree.c
+++ b/
fs/hfs/btree.c
@@
-21,10
+21,9
@@
struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
struct page *page;
unsigned int size;
struct page *page;
unsigned int size;
- tree = k
m
alloc(sizeof(*tree), GFP_KERNEL);
+ tree = k
z
alloc(sizeof(*tree), GFP_KERNEL);
if (!tree)
return NULL;
if (!tree)
return NULL;
- memset(tree, 0, sizeof(*tree));
init_MUTEX(&tree->tree_lock);
spin_lock_init(&tree->hash_lock);
init_MUTEX(&tree->tree_lock);
spin_lock_init(&tree->hash_lock);
@@
-36,8
+35,7
@@
struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
tree->inode = iget_locked(sb, id);
if (!tree->inode)
goto free_tree;
tree->inode = iget_locked(sb, id);
if (!tree->inode)
goto free_tree;
- if (!(tree->inode->i_state & I_NEW))
- BUG();
+ BUG_ON(!(tree->inode->i_state & I_NEW));
{
struct hfs_mdb *mdb = HFS_SB(sb)->mdb;
HFS_I(tree->inode)->flags = 0;
{
struct hfs_mdb *mdb = HFS_SB(sb)->mdb;
HFS_I(tree->inode)->flags = 0;
@@
-60,7
+58,7
@@
struct hfs_btree *hfs_btree_open(struct super_block *sb, u32 id, btree_keycmp ke
unlock_new_inode(tree->inode);
mapping = tree->inode->i_mapping;
unlock_new_inode(tree->inode);
mapping = tree->inode->i_mapping;
- page = read_
cache_page(mapping, 0, (filler_t *)mapping->a_ops->readpage
, NULL);
+ page = read_
mapping_page(mapping, 0
, NULL);
if (IS_ERR(page))
goto free_tree;
if (IS_ERR(page))
goto free_tree;
@@
-111,7
+109,7
@@
void hfs_btree_close(struct hfs_btree *tree)
while ((node = tree->node_hash[i])) {
tree->node_hash[i] = node->next_hash;
if (atomic_read(&node->refcnt))
while ((node = tree->node_hash[i])) {
tree->node_hash[i] = node->next_hash;
if (atomic_read(&node->refcnt))
- printk(
"HFS
: node %d:%d still has %d user(s)!\n",
+ printk(
KERN_ERR "hfs
: node %d:%d still has %d user(s)!\n",
node->tree->cnid, node->this, atomic_read(&node->refcnt));
hfs_bnode_free(node);
tree->node_hash_cnt--;
node->tree->cnid, node->this, atomic_read(&node->refcnt));
hfs_bnode_free(node);
tree->node_hash_cnt--;
@@
-252,7
+250,7
@@
struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *tree)
kunmap(*pagep);
nidx = node->next;
if (!nidx) {
kunmap(*pagep);
nidx = node->next;
if (!nidx) {
- printk(
"
create new bmap node...\n");
+ printk(
KERN_DEBUG "hfs:
create new bmap node...\n");
next_node = hfs_bmap_new_bmap(node, idx);
} else
next_node = hfs_bnode_find(tree, nidx);
next_node = hfs_bmap_new_bmap(node, idx);
} else
next_node = hfs_bnode_find(tree, nidx);
@@
-292,7
+290,7
@@
void hfs_bmap_free(struct hfs_bnode *node)
hfs_bnode_put(node);
if (!i) {
/* panic */;
hfs_bnode_put(node);
if (!i) {
/* panic */;
- printk(
"HFS
: unable to free bnode %u. bmap not found!\n", node->this);
+ printk(
KERN_CRIT "hfs
: unable to free bnode %u. bmap not found!\n", node->this);
return;
}
node = hfs_bnode_find(tree, i);
return;
}
node = hfs_bnode_find(tree, i);
@@
-300,7
+298,7
@@
void hfs_bmap_free(struct hfs_bnode *node)
return;
if (node->type != HFS_NODE_MAP) {
/* panic */;
return;
if (node->type != HFS_NODE_MAP) {
/* panic */;
- printk(
"HFS
: invalid bmap found! (%u,%d)\n", node->this, node->type);
+ printk(
KERN_CRIT "hfs
: invalid bmap found! (%u,%d)\n", node->this, node->type);
hfs_bnode_put(node);
return;
}
hfs_bnode_put(node);
return;
}
@@
-313,7
+311,7
@@
void hfs_bmap_free(struct hfs_bnode *node)
m = 1 << (~nidx & 7);
byte = data[off];
if (!(byte & m)) {
m = 1 << (~nidx & 7);
byte = data[off];
if (!(byte & m)) {
- printk(
"HFS
: trying to free free bnode %u(%d)\n", node->this, node->type);
+ printk(
KERN_CRIT "hfs
: trying to free free bnode %u(%d)\n", node->this, node->type);
kunmap(page);
hfs_bnode_put(node);
return;
kunmap(page);
hfs_bnode_put(node);
return;