Commit e32b123f authored by Juergen Gross's avatar Juergen Gross Committed by Greg Kroah-Hartman

xen/scsiback: correct frontend counting

commit f285aa8d upstream.

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>
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 392abe33
...@@ -939,12 +939,12 @@ static int scsiback_add_translation_entry(struct vscsibk_info *info, ...@@ -939,12 +939,12 @@ static int scsiback_add_translation_entry(struct vscsibk_info *info,
spin_unlock_irqrestore(&info->v2p_lock, flags); spin_unlock_irqrestore(&info->v2p_lock, flags);
out_free: out_free:
mutex_lock(&tpg->tv_tpg_mutex); if (err) {
tpg->tv_tpg_fe_count--; mutex_lock(&tpg->tv_tpg_mutex);
mutex_unlock(&tpg->tv_tpg_mutex); tpg->tv_tpg_fe_count--;
mutex_unlock(&tpg->tv_tpg_mutex);
if (err)
kfree(new); kfree(new);
}
return err; 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