/* LPT trivial garbage collection is where a LPT LEB contains only dirty and free space and so may be reused as soon as the next commit is completed. This function is called after the commit is completed (master node has been written) and un-maps LPT LEBs that were marked for trivial GC.  */
static int lpt_tgc_end(struct ubifs_info *c)
/* LPT trivial garbage collection is where a LPT LEB contains only dirty and free space and so may be reused as soon as the next commit is completed. This function is called after the commit is completed (master node has been written) and un-maps LPT LEBs that were marked for trivial GC.  */
static int lpt_tgc_end(struct ubifs_info *c)
{
	int i, err;
	for (i = 0; i < c->lpt_lebs; i++)
		if (c->ltab[i].tgc) {
			err = ubifs_leb_unmap(c, i + c->lpt_first);
			if (err)
				return err;
			c->ltab[i].tgc = 0;
			dbg_lp("LEB %d", i + c->lpt_first);
		}
	return 0;
}