]> Pileus Git - ~andy/linux/commit
xen/pciback: use mutex rather than spinlock in passthrough backend
authorJan Beulich <JBeulich@suse.com>
Mon, 19 Sep 2011 16:32:15 +0000 (17:32 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 21 Sep 2011 20:51:23 +0000 (16:51 -0400)
commit04df355227fa75c015491153cfc93e7ea7a80112
tree99914c01f75b6ab728c568faeccb37ab4a7a4330
parent5fa99911a346e1f95c7932ff99a76693037e7927
xen/pciback: use mutex rather than spinlock in passthrough backend

To accommodate the call to the callback function from
__xen_pcibk_publish_pci_roots(), which so far dropped and the re-
acquired the lock without checking that the list didn't actually
change, convert the code to use a mutex instead (observing that the
code taking the lock won't ever get called from non-sleepable
context).

As a result, drop the bogus use of list_for_each_entry_safe() and
remove the inappropriate dropping of the lock.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/xen-pciback/passthrough.c