Lines Matching full:tree
15 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) in hfs_find_init() argument
19 fd->tree = tree; in hfs_find_init()
21 ptr = kmalloc(tree->max_key_len * 2 + 4, GFP_KERNEL); in hfs_find_init()
25 fd->key = ptr + tree->max_key_len + 2; in hfs_find_init()
27 tree->cnid, __builtin_return_address(0)); in hfs_find_init()
28 switch (tree->cnid) { in hfs_find_init()
30 mutex_lock_nested(&tree->tree_lock, CATALOG_BTREE_MUTEX); in hfs_find_init()
33 mutex_lock_nested(&tree->tree_lock, EXTENTS_BTREE_MUTEX); in hfs_find_init()
36 mutex_lock_nested(&tree->tree_lock, ATTR_BTREE_MUTEX); in hfs_find_init()
49 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit()
50 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit()
51 fd->tree = NULL; in hfs_find_exit()
63 if (bnode->tree->cnid == HFSPLUS_EXT_CNID) { in hfs_find_1st_rec_by_cnid()
66 } else if (bnode->tree->cnid == HFSPLUS_CAT_CNID) { in hfs_find_1st_rec_by_cnid()
69 } else if (bnode->tree->cnid == HFSPLUS_ATTR_CNID) { in hfs_find_1st_rec_by_cnid()
100 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in hfs_find_rec_by_key()
162 /* Traverse a B*Tree from the root to a leaf finding best fit to key */
166 struct hfs_btree *tree; in hfs_brec_find() local
172 tree = fd->tree; in hfs_brec_find()
176 nidx = tree->root; in hfs_brec_find()
179 height = tree->depth; in hfs_brec_find()
183 bnode = hfs_bnode_find(tree, nidx); in hfs_brec_find()
210 pr_err("inconsistency in B*Tree (%d,%d,%d,%u,%u)\n", in hfs_brec_find()
233 struct hfs_btree *tree; in hfs_brec_goto() local
239 tree = bnode->tree; in hfs_brec_goto()
252 bnode = hfs_bnode_find(tree, idx); in hfs_brec_goto()
270 bnode = hfs_bnode_find(tree, idx); in hfs_brec_goto()