/* For now we assume each new node adds one znode. But this is rather poor approximation, though.  */
static int calc_idx_growth(const struct ubifs_info *c, const struct ubifs_budget_req *req)
/* For now we assume each new node adds one znode. But this is rather poor approximation, though.  */
static int calc_idx_growth(const struct ubifs_info *c, const struct ubifs_budget_req *req)
{
	int znodes;
	znodes = req->new_ino + (req->new_page << UBIFS_BLOCKS_PER_PAGE_SHIFT) +
		 req->new_dent;
	return znodes * c->max_idx_node_sz;
}