/* empty_log_bytes - calculate amount of empty space in the log.  */
static long long empty_log_bytes(const struct ubifs_info *c)
/* empty_log_bytes - calculate amount of empty space in the log.  */
static long long empty_log_bytes(const struct ubifs_info *c)
{
	long long h, t;
	h = (long long)c->lhead_lnum * c->leb_size + c->lhead_offs;
	t = (long long)c->ltail_lnum * c->leb_size;
	if (h >= t)
		return c->log_bytes - h + t;
	else
		return t - h;
}