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 mutex_lock_nested(&tree->tree_lock, in hfs_find_init()
29 hfsplus_btree_lock_class(tree)); in hfs_find_init()
38 fd->tree->cnid, __builtin_return_address(0)); in hfs_find_exit()
39 mutex_unlock(&fd->tree->tree_lock); in hfs_find_exit()
40 fd->tree = NULL; in hfs_find_exit()
52 if (bnode->tree->cnid == HFSPLUS_EXT_CNID) { in hfs_find_1st_rec_by_cnid()
55 } else if (bnode->tree->cnid == HFSPLUS_CAT_CNID) { in hfs_find_1st_rec_by_cnid()
58 } else if (bnode->tree->cnid == HFSPLUS_ATTR_CNID) { in hfs_find_1st_rec_by_cnid()
89 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in hfs_find_rec_by_key()
151 /* Traverse a B*Tree from the root to a leaf finding best fit to key */
155 struct hfs_btree *tree; in hfs_brec_find() local
161 tree = fd->tree; in hfs_brec_find()
165 nidx = tree->root; in hfs_brec_find()
168 height = tree->depth; in hfs_brec_find()
172 bnode = hfs_bnode_find(tree, nidx); in hfs_brec_find()
199 pr_err("inconsistency in B*Tree (%d,%d,%d,%u,%u)\n", in hfs_brec_find()
222 struct hfs_btree *tree; in hfs_brec_goto() local
228 tree = bnode->tree; in hfs_brec_goto()
241 bnode = hfs_bnode_find(tree, idx); in hfs_brec_goto()
259 bnode = hfs_bnode_find(tree, idx); in hfs_brec_goto()