/* This function runs garbage collector to make some more free space. Returns zero if a free LEB has been produced, %-EAGAIN if commit is required, and a negative error code in case of failure.  */
static int run_gc(struct ubifs_info *c)
/* This function runs garbage collector to make some more free space. Returns zero if a free LEB has been produced, %-EAGAIN if commit is required, and a negative error code in case of failure.  */
static int run_gc(struct ubifs_info *c)
{
	int err, lnum;
	down_read(&c->commit_sem);
	lnum = ubifs_garbage_collect(c, 1);
	up_read(&c->commit_sem);
	if (lnum < 0)
		return lnum;
	dbg_budg("GC freed LEB %d", lnum);
	err = ubifs_return_leb(c, lnum);
	if (err)
		return err;
	return 0;
}