/* Note: the dentry argument is the parent dentry.  */
static int __affs_hash_dentry(struct dentry *dentry, struct qstr *qstr, toupper_t toupper)
/* Note: the dentry argument is the parent dentry.  */
static int __affs_hash_dentry(struct dentry *dentry, struct qstr *qstr, toupper_t toupper)
{
	const u8 *name = qstr->name;
	unsigned long hash;
	int i;
	i = affs_check_name(qstr->name,qstr->len);
	if (i)
		return i;
	hash = init_name_hash();
	i = min(qstr->len, 30u);
	for (; i > 0; name++, i--)
		hash = partial_name_hash(toupper(*name), hash);
	qstr->hash = end_name_hash(hash);
	return 0;
}