/* This function ensures that the LEB reserved for garbage collection is marked as "taken" in lprops. We also have to set free space to LEB size and dirty space to zero, because lprops may contain out-of-date information if the file-system was un-mounted before it has been committed. This function returns zero in case of success and a negative error code in case of failure.  */
static int take_gc_lnum(struct ubifs_info *c)
/* This function ensures that the LEB reserved for garbage collection is marked as "taken" in lprops. We also have to set free space to LEB size and dirty space to zero, because lprops may contain out-of-date information if the file-system was un-mounted before it has been committed. This function returns zero in case of success and a negative error code in case of failure.  */
static int take_gc_lnum(struct ubifs_info *c)
{
	int err;
	if (c->gc_lnum == -1) {
		ubifs_err("no LEB for GC");
		return -EINVAL;
	}
	err = ubifs_change_one_lp(c, c->gc_lnum, c->leb_size, 0,
				  LPROPS_TAKEN, 0, 0);
	return err;
}