/* This function returns next sequence number to use, which is just the current global sequence counter value. It also increases the global sequence counter.  */
static unsigned long long next_sqnum(struct ubi_device *ubi)
/* This function returns next sequence number to use, which is just the current global sequence counter value. It also increases the global sequence counter.  */
static unsigned long long next_sqnum(struct ubi_device *ubi)
{
	unsigned long long sqnum;
	spin_lock(&ubi->ltree_lock);
	sqnum = ubi->global_sqnum++;
	spin_unlock(&ubi->ltree_lock);
	return sqnum;
}