/* This function converts budget which was allocated for a new page of data to the budget of changing an existing page of data. The latter is smaller than the former, so this function only does simple re-calculation and does not involve any write-back.  */
void ubifs_convert_page_budget(struct ubifs_info *c)
/* This function converts budget which was allocated for a new page of data to the budget of changing an existing page of data. The latter is smaller than the former, so this function only does simple re-calculation and does not involve any write-back.  */
void ubifs_convert_page_budget(struct ubifs_info *c)
{
	spin_lock(&c->space_lock);
	c->bi.idx_growth -= c->max_idx_node_sz << UBIFS_BLOCKS_PER_PAGE_SHIFT;
	c->bi.data_growth -= c->bi.page_budget;
	c->bi.dd_growth += c->bi.page_budget;
	c->bi.min_idx_lebs = ubifs_calc_min_idx_lebs(c);
	spin_unlock(&c->space_lock);
}