Commit f285aa8d authored by Juergen Gross's avatar Juergen Gross Committed by David Vrabel

xen/scsiback: correct frontend counting

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>
parent a4cdb556
......@@ -939,12 +939,12 @@ static int scsiback_add_translation_entry(struct vscsibk_info *info,
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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment