/* This function calculates and returns current UBIFS liability, i.e. the amount of bytes UBIFS has "promised" to write to the media.  */
static long long get_liability(struct ubifs_info *c)
/* This function calculates and returns current UBIFS liability, i.e. the amount of bytes UBIFS has "promised" to write to the media.  */
static long long get_liability(struct ubifs_info *c)
{
	long long liab;
	spin_lock(&c->space_lock);
	liab = c->bi.idx_growth + c->bi.data_growth + c->bi.dd_growth;
	spin_unlock(&c->space_lock);
	return liab;
}