Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e95f1916 authored by Juergen Gross's avatar Juergen Gross Committed by Sasha Levin
Browse files

xen/scsiback: correct frontend counting



[ Upstream commit f285aa8db7cc4432c1a03f8b55ff34fe96317c11 ]

When adding a new frontend to xen-scsiback don't decrement the number
of active frontends in case of no error. Doing so results in a failure
when trying to remove the xen-pvscsi nexus even if no domain is using
it.

Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 06a0f04f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -947,12 +947,12 @@ out:
	spin_unlock_irqrestore(&info->v2p_lock, flags);

out_free:
	if (err) {
		mutex_lock(&tpg->tv_tpg_mutex);
		tpg->tv_tpg_fe_count--;
		mutex_unlock(&tpg->tv_tpg_mutex);

	if (err)
		kfree(new);
	}

	return err;
}