Lines Matching refs:fd
34 struct hfs_find_data fd; in hfsplus_lookup() local
44 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_lookup()
47 err = hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, in hfsplus_lookup()
52 err = hfs_brec_read(&fd, &entry, sizeof(entry)); in hfsplus_lookup()
55 hfs_find_exit(&fd); in hfsplus_lookup()
64 if (fd.entrylength < sizeof(struct hfsplus_cat_folder)) { in hfsplus_lookup()
71 if (fd.entrylength < sizeof(struct hfsplus_cat_file)) { in hfsplus_lookup()
103 err = hfsplus_cat_build_key(sb, fd.search_key, in hfsplus_lookup()
117 hfs_find_exit(&fd); in hfsplus_lookup()
126 hfs_find_exit(&fd); in hfsplus_lookup()
137 struct hfs_find_data fd; in hfsplus_readdir() local
144 err = hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); in hfsplus_readdir()
152 hfsplus_cat_build_key_with_cnid(sb, fd.search_key, inode->i_ino); in hfsplus_readdir()
153 err = hfs_brec_find(&fd, hfs_find_rec_by_key); in hfsplus_readdir()
164 if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) { in hfsplus_readdir()
169 hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, in hfsplus_readdir()
170 fd.entrylength); in hfsplus_readdir()
176 if (fd.entrylength < HFSPLUS_MIN_THREAD_SZ) { in hfsplus_readdir()
188 err = hfs_brec_goto(&fd, ctx->pos - 1); in hfsplus_readdir()
192 if (be32_to_cpu(fd.key->cat.parent) != inode->i_ino) { in hfsplus_readdir()
198 if (fd.entrylength > sizeof(entry) || fd.entrylength < 0) { in hfsplus_readdir()
203 hfs_bnode_read(fd.bnode, &entry, fd.entryoffset, in hfsplus_readdir()
204 fd.entrylength); in hfsplus_readdir()
207 err = hfsplus_uni2asc(sb, &fd.key->cat.name, strbuf, &len); in hfsplus_readdir()
211 if (fd.entrylength < in hfsplus_readdir()
228 if (fd.entrylength < sizeof(struct hfsplus_cat_file)) { in hfsplus_readdir()
260 err = hfs_brec_goto(&fd, 1); in hfsplus_readdir()
281 memcpy(&rd->key, fd.key, sizeof(struct hfsplus_cat_key)); in hfsplus_readdir()
284 hfs_find_exit(&fd); in hfsplus_readdir()