/* During commit it is sometimes necessary to copy a pnode (see dirty_cow_pnode). When that happens, references in category lists and heaps must be replaced. This function does that.  */
static void replace_cats(struct ubifs_info *c, struct ubifs_pnode *old_pnode, struct ubifs_pnode *new_pnode)
/* During commit it is sometimes necessary to copy a pnode (see dirty_cow_pnode). When that happens, references in category lists and heaps must be replaced. This function does that.  */
static void replace_cats(struct ubifs_info *c, struct ubifs_pnode *old_pnode, struct ubifs_pnode *new_pnode)
{
	int i;
	for (i = 0; i < UBIFS_LPT_FANOUT; i++) {
		if (!new_pnode->lprops[i].lnum)
			return;
		ubifs_replace_cat(c, &old_pnode->lprops[i],
				  &new_pnode->lprops[i]);
	}
}