/* This function look up and reads a node which contains name hash in the key. Since the hash may have collisions, there may be many nodes with the same key, so we have to sequentially look to all of them until the needed one is found. This function returns zero in case of success, %-ENOENT if the node was not found, and a negative error code in case of failure.  */
int ubifs_tnc_lookup_nm(struct ubifs_info *c, const union ubifs_key *key, void *node, const struct qstr *nm)
/* This function look up and reads a node which contains name hash in the key. Since the hash may have collisions, there may be many nodes with the same key, so we have to sequentially look to all of them until the needed one is found. This function returns zero in case of success, %-ENOENT if the node was not found, and a negative error code in case of failure.  */
int ubifs_tnc_lookup_nm(struct ubifs_info *c, const union ubifs_key *key, void *node, const struct qstr *nm)
{
	int err, len;
	const struct ubifs_dent_node *dent = node;
	err = ubifs_tnc_lookup(c, key, node);
	if (err)
		return err;
	len = le16_to_cpu(dent->nlen);
	if (nm->len == len && !memcmp(dent->name, nm->name, len))
		return 0;
	return do_lookup_nm(c, key, node, nm);
}