/* 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 during start commit to mark LPT LEBs for trivial GC.  */
static void lpt_tgc_start(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 during start commit to mark LPT LEBs for trivial GC.  */
static void lpt_tgc_start(struct ubifs_info *c)
{
	int i;
	for (i = 0; i < c->lpt_lebs; i++) {
		if (i + c->lpt_first == c->nhead_lnum)
			continue;
		if (c->ltab[i].dirty > 0 &&
		    c->ltab[i].free + c->ltab[i].dirty == c->leb_size) {
			c->ltab[i].tgc = 1;
			c->ltab[i].free = c->leb_size;
			c->ltab[i].dirty = 0;
			dbg_lp("LEB %d", i + c->lpt_first);
		}
	}
}