/* This function clears the "taken" flag for the LEBs which were used by the "commit in-the-gaps" method.  */
static int return_gap_lebs(struct ubifs_info *c)
/* This function clears the "taken" flag for the LEBs which were used by the "commit in-the-gaps" method.  */
static int return_gap_lebs(struct ubifs_info *c)
{
	int *p, err;
	if (!c->gap_lebs)
		return 0;
	dbg_cmt("");
	for (p = c->gap_lebs; *p != -1; p++) {
		err = ubifs_change_one_lp(c, *p, LPROPS_NC, LPROPS_NC, 0,
					  LPROPS_TAKEN, 0);
		if (err)
			return err;
	}
	kfree(c->gap_lebs);
	c->gap_lebs = NULL;
	return 0;
}