X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fhfs%2Fbrec.c;h=5c87cf4801fcb00f05311d2883c9977dbfa5ef2f;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=5e54671dcff9c6a195163a4f6f36052531c89967;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/hfs/brec.c b/fs/hfs/brec.c index 5e54671dc..5c87cf480 100644 --- a/fs/hfs/brec.c +++ b/fs/hfs/brec.c @@ -10,10 +10,14 @@ #include "btree.h" +static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd); +static int hfs_brec_update_parent(struct hfs_find_data *fd); +static int hfs_btree_inc_height(struct hfs_btree *tree); + /* Get the length and offset of the given record in the given node */ u16 hfs_brec_lenoff(struct hfs_bnode *node, u16 rec, u16 *off) { - u16 retval[2]; + __be16 retval[2]; u16 dataoff; dataoff = node->tree->node_size - (rec + 2) * 2; @@ -55,7 +59,7 @@ int hfs_brec_insert(struct hfs_find_data *fd, void *entry, int entry_len) int size, key_len, rec; int data_off, end_off; int idx_rec_off, data_rec_off, end_rec_off; - u32 cnid; + __be32 cnid; tree = fd->tree; if (!fd->bnode) { @@ -211,7 +215,7 @@ skip: return 0; } -struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd) +static struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd) { struct hfs_btree *tree; struct hfs_bnode *node, *new_node; @@ -320,7 +324,7 @@ struct hfs_bnode *hfs_bnode_split(struct hfs_find_data *fd) return new_node; } -int hfs_brec_update_parent(struct hfs_find_data *fd) +static int hfs_brec_update_parent(struct hfs_find_data *fd) { struct hfs_btree *tree; struct hfs_bnode *node, *new_node, *parent; @@ -358,7 +362,7 @@ again: end_off = hfs_bnode_read_u16(parent, end_rec_off); if (end_rec_off - end_off < diff) { - printk("splitting index node...\n"); + printk(KERN_DEBUG "hfs: splitting index node...\n"); fd->bnode = parent; new_node = hfs_bnode_split(fd); if (IS_ERR(new_node)) @@ -391,7 +395,7 @@ skip: node = parent; if (new_node) { - u32 cnid; + __be32 cnid; fd->bnode = hfs_bnode_find(tree, new_node->parent); /* create index key and entry */ @@ -418,12 +422,12 @@ out: return 0; } -int hfs_btree_inc_height(struct hfs_btree *tree) +static int hfs_btree_inc_height(struct hfs_btree *tree) { struct hfs_bnode *node, *new_node; struct hfs_bnode_desc node_desc; int key_size, rec; - u32 cnid; + __be32 cnid; node = NULL; if (tree->root) {