]> www.infradead.org Git - users/jedix/linux-maple.git/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, 19 Oct 2011 17:33:41 +0000 (13:33 -0400)
commit84c49b77860ab37ea334d504c9f3775bf9bde759
treec2c07ee09d62ba101a8c1194ed07892ab83000fa
parent0653a4a14ac5ee14cef22af1528c4c35fef69fb8
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