/* Returns %0 on success, and a negative error code on failure.  */
int insert_old_idx_znode(struct ubifs_info *c, struct ubifs_znode *znode)
/* Returns %0 on success, and a negative error code on failure.  */
int insert_old_idx_znode(struct ubifs_info *c, struct ubifs_znode *znode)
{
	if (znode->parent) {
		struct ubifs_zbranch *zbr;
		zbr = &znode->parent->zbranch[znode->iip];
		if (zbr->len)
			return insert_old_idx(c, zbr->lnum, zbr->offs);
	} else
		if (c->zroot.len)
			return insert_old_idx(c, c->zroot.lnum,
					      c->zroot.offs);
	return 0;
}