/* This is a helper function for ext3_dx_readdir. It calls filldir for all entres on the fname linked list. (Normally there is only one entry on the linked list, unless there are 62 bit hash collisions.)  */
static int call_filldir(struct file *filp, void *dirent, filldir_t filldir, struct fname *fname)
/* This is a helper function for ext3_dx_readdir. It calls filldir for all entres on the fname linked list. (Normally there is only one entry on the linked list, unless there are 62 bit hash collisions.)  */
static int call_filldir(struct file *filp, void *dirent, filldir_t filldir, struct fname *fname)
{
	struct dir_private_info *info = filp->private_data;
	loff_t	curr_pos;
	struct inode *inode = filp->f_path.dentry->d_inode;
	struct super_block * sb;
	int error;
	sb = inode->i_sb;
	if (!fname) {
		printk("call_filldir: called with null fname?!?\n");
		return 0;
	}
	curr_pos = hash2pos(fname->hash, fname->minor_hash);
	while (fname) {
		error = filldir(dirent, fname->name,
				fname->name_len, curr_pos,
				fname->inode,
				get_dtype(sb, fname->file_type));
		if (error) {
			filp->f_pos = curr_pos;
			info->extra_fname = fname;
			return error;
		}
		fname = fname->next;
	}
	return 0;
}