/* This function returns %0 on success and a negative error code on failure.  */
static int read_lsave(struct ubifs_info *c)
/* This function returns %0 on success and a negative error code on failure.  */
static int read_lsave(struct ubifs_info *c)
{
	int err, i;
	void *buf;
	buf = vmalloc(c->lsave_sz);
	if (!buf)
		return -ENOMEM;
	err = ubi_read(c->ubi, c->lsave_lnum, buf, c->lsave_offs, c->lsave_sz);
	if (err)
		goto out;
	err = unpack_lsave(c, buf);
	if (err)
		goto out;
	for (i = 0; i < c->lsave_cnt; i++) {
		int lnum = c->lsave[i];
		if (lnum >= c->leb_cnt)
			continue;
		ubifs_lpt_lookup(c, lnum);
	}
out:
	vfree(buf);
	return err;
}