xen: when removing a backend don't remove many of them
commitc8e36e865c8a51c60343246d3a97b47559dc8c63
authorJuergen Gross <jgross@suse.com>
Tue, 2 Aug 2016 12:14:03 +0000 (2 14:14 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 3 Aug 2016 08:29:10 +0000 (3 10:29 +0200)
tree91167b7fbc770e9b8a812c7825e717b931267abf
parent72aa364b1d9daa889bb5898ea4aded9d27fd1c96
xen: when removing a backend don't remove many of them

When a Xenstore watch fires indicating a backend has to be removed
don't remove all backends for that domain with the specified device
index, but just the one which has the correct type.

The easiest way to achieve this is to use the already determined
xendev as parameter for xen_be_del_xendev() instead of only the domid
and device index.

This at once removes the open coded QTAILQ_FOREACH_SAVE() in
xen_be_del_xendev() as there is no need to search for the correct
xendev any longer.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Message-id: 1470140044-16492-2-git-send-email-jgross@suse.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/xen/xen_backend.c