/* This function reads a "hashed" node defined by @zbr from the leaf node cache (in it is there) or from the hash media, in which case the node is also added to LNC. Returns zero in case of success or a negative negative error code in case of failure.  */
static int tnc_read_node_nm(struct ubifs_info *c, struct ubifs_zbranch *zbr, void *node)
/* This function reads a "hashed" node defined by @zbr from the leaf node cache (in it is there) or from the hash media, in which case the node is also added to LNC. Returns zero in case of success or a negative negative error code in case of failure.  */
static int tnc_read_node_nm(struct ubifs_info *c, struct ubifs_zbranch *zbr, void *node)
{
	int err;
	ubifs_assert(is_hash_key(c, &zbr->key));
	if (zbr->leaf) {
		ubifs_assert(zbr->len != 0);
		memcpy(node, zbr->leaf, zbr->len);
		return 0;
	}
	err = ubifs_tnc_read_node(c, zbr, node);
	if (err)
		return err;
	err = lnc_add(c, zbr, node);
	return err;
}