/* Called during start commit so locks are not needed.  */
int ubifs_get_idx_gc_leb(struct ubifs_info *c)
/* Called during start commit so locks are not needed.  */
int ubifs_get_idx_gc_leb(struct ubifs_info *c)
{
	struct ubifs_gced_idx_leb *idx_gc;
	int lnum;
	if (list_empty(&c->idx_gc))
		return -ENOSPC;
	idx_gc = list_entry(c->idx_gc.next, struct ubifs_gced_idx_leb, list);
	lnum = idx_gc->lnum;
	list_del(&idx_gc->list);
	kfree(idx_gc);
	return lnum;
}