/* calc_dd_growth - calculate approximate amount of data which makes other data dirty from budgeting request.  */
static int calc_dd_growth(const struct ubifs_info *c, const struct ubifs_budget_req *req)
/* calc_dd_growth - calculate approximate amount of data which makes other data dirty from budgeting request.  */
static int calc_dd_growth(const struct ubifs_info *c, const struct ubifs_budget_req *req)
{
	int dd_growth;
	dd_growth = req->dirtied_page ? c->bi.page_budget : 0;
	if (req->dirtied_ino)
		dd_growth += c->bi.inode_budget << (req->dirtied_ino - 1);
	if (req->mod_dent)
		dd_growth += c->bi.dent_budget;
	dd_growth += req->dirtied_ino_d;
	return dd_growth;
}