/* This function returns %0 on success and a negative error code on failure.  */
int ubifs_recover_inl_heads(const struct ubifs_info *c, void *sbuf)
/* This function returns %0 on success and a negative error code on failure.  */
int ubifs_recover_inl_heads(const struct ubifs_info *c, void *sbuf)
{
	int err;
	ubifs_assert(!(c->vfs_sb->s_flags & MS_RDONLY) || c->remounting_rw);
	dbg_rcvry("checking index head at %d:%d", c->ihead_lnum, c->ihead_offs);
	err = recover_head(c, c->ihead_lnum, c->ihead_offs, sbuf);
	if (err)
		return err;
	dbg_rcvry("checking LPT head at %d:%d", c->nhead_lnum, c->nhead_offs);
	err = recover_head(c, c->nhead_lnum, c->nhead_offs, sbuf);
	if (err)
		return err;
	return 0;
}