hfs_cat_build_key(dst_fd.search_key, dst_dir->i_ino, dst_name); 
hfs_cat_build_key(sb, dst_fd.search_key, dst_dir->i_ino, dst_name); 
int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name,		 struct inode *dst_dir, struct qstr *dst_name){	struct super_block *sb;	struct hfs_find_data src_fd, dst_fd;	union hfs_cat_rec entry;	int entry_size, type;	int err;	dprint(DBG_CAT_MOD, "rename_cat: %u - %lu,%s - %lu,%s\n", cnid, src_dir->i_ino, src_name->name,		dst_dir->i_ino, dst_name->name);	sb = src_dir->i_sb;	hfs_find_init(HFS_SB(sb)->cat_tree, &src_fd);	dst_fd = src_fd;	/* find the old dir entry and read the data */	hfs_cat_build_key(src_fd.search_key, src_dir->i_ino, src_name);	err = hfs_brec_find(&src_fd);	if (err)		goto out;	hfs_bnode_read(src_fd.bnode, &entry, src_fd.entryoffset,			    src_fd.entrylength);	/* create new dir entry with the data from the old entry */	hfs_cat_build_key(dst_fd.search_key, dst_dir->i_ino, dst_name);	err = hfs_brec_find(&dst_fd);	if (err != -ENOENT) {		if (!err)			err = -EEXIST;		goto out;	}	err = hfs_brec_insert(&dst_fd, &entry, src_fd.entrylength);	if (err)		goto out;	dst_dir->i_size++;	dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC;	mark_inode_dirty(dst_dir);	/* finally remove the old entry */	hfs_cat_build_key(src_fd.search_key, src_dir->i_ino, src_name);	err = hfs_brec_find(&src_fd);	if (err)		goto out;	err = hfs_brec_remove(&src_fd);	if (err)		goto out;	src_dir->i_size--;	src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC;	mark_inode_dirty(src_dir);	type = entry.type;	if (type == HFS_CDR_FIL && !(entry.file.Flags & HFS_FIL_THD))		goto out;	/* remove old thread entry */	hfs_cat_build_key(src_fd.search_key, cnid, NULL);	err = hfs_brec_find(&src_fd);	if (err)		goto out;	err = hfs_brec_remove(&src_fd);	if (err)		goto out;	/* create new thread entry */	hfs_cat_build_key(dst_fd.search_key, cnid, NULL);	entry_size = hfs_cat_build_thread(&entry, type == HFS_CDR_FIL ? HFS_CDR_FTH : HFS_CDR_THD,					dst_dir->i_ino, dst_name);	err = hfs_brec_find(&dst_fd);	if (err != -ENOENT) {		if (!err)			err = -EEXIST;		goto out;	}	err = hfs_brec_insert(&dst_fd, &entry, entry_size);out:	hfs_bnode_put(dst_fd.bnode);	hfs_find_exit(&src_fd);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/328b9227865026268261a24a97a578907b280415/catalog.c/clean/fs/hfs/catalog.c