/* find_next_dirty - find next dirty znode. @znode: znode to begin searching from  */
static struct ubifs_znode* find_next_dirty(struct ubifs_znode *znode)
/* find_next_dirty - find next dirty znode. @znode: znode to begin searching from  */
static struct ubifs_znode* find_next_dirty(struct ubifs_znode *znode)
{
	int n = znode->iip + 1;
	znode = znode->parent;
	if (!znode)
		return NULL;
	for (; n < znode->child_cnt; n++) {
		struct ubifs_zbranch *zbr = &znode->zbranch[n];
		if (zbr->znode && ubifs_zn_dirty(zbr->znode))
			return find_first_dirty(zbr->znode);
	}
	return znode;
}