mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02:00
xen/scsiback: correct frontend counting
commit f285aa8db7 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: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
392abe33d5
commit
e32b123fee
|
|
@ -939,12 +939,12 @@ static int scsiback_add_translation_entry(struct vscsibk_info *info,
|
|||
spin_unlock_irqrestore(&info->v2p_lock, flags);
|
||||
|
||||
out_free:
|
||||
mutex_lock(&tpg->tv_tpg_mutex);
|
||||
tpg->tv_tpg_fe_count--;
|
||||
mutex_unlock(&tpg->tv_tpg_mutex);
|
||||
|
||||
if (err)
|
||||
if (err) {
|
||||
mutex_lock(&tpg->tv_tpg_mutex);
|
||||
tpg->tv_tpg_fe_count--;
|
||||
mutex_unlock(&tpg->tv_tpg_mutex);
|
||||
kfree(new);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user