/* Hash a string to an integer in a case-independent way  */
int hfs_hash_dentry(struct dentry *dentry, struct qstr *this)
/* Hash a string to an integer in a case-independent way  */
int hfs_hash_dentry(struct dentry *dentry, struct qstr *this)
{
	const unsigned char *name = this->name;
	unsigned int hash, len = this->len;
	if (len > HFS_NAMELEN)
		len = HFS_NAMELEN;
	hash = init_name_hash();
	for (; len; len--)
		hash = partial_name_hash(caseorder[*name++], hash);
	this->hash = end_name_hash(hash);
	return 0;
}