diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-16 23:12:38 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-22 13:34:38 -0400 |
commit | a7479d74460a4873b73534aa89cb82ab70ff8a32 (patch) | |
tree | 973c026fc25f741f5d78a26c10c2e5c5127228a7 /drivers/pci/remove.c | |
parent | d563e2ccc8adb1385da42e6077736ba6854117bb (diff) |
PCI: Leave normal LIST_POISON in deleted list entries
list_del() already sets next/prev to LIST_POISON1/LIST_POISON2, so we
don't need to do anything special here to prevent further list accesses.
Tested-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'drivers/pci/remove.c')
-rw-r--r-- | drivers/pci/remove.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index c01bacad9fd9..4f9ca9162895 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c | |||
@@ -32,11 +32,8 @@ static void pci_stop_dev(struct pci_dev *dev) | |||
32 | 32 | ||
33 | static void pci_destroy_dev(struct pci_dev *dev) | 33 | static void pci_destroy_dev(struct pci_dev *dev) |
34 | { | 34 | { |
35 | /* Remove the device from the device lists, and prevent any further | ||
36 | * list accesses from this device */ | ||
37 | down_write(&pci_bus_sem); | 35 | down_write(&pci_bus_sem); |
38 | list_del(&dev->bus_list); | 36 | list_del(&dev->bus_list); |
39 | dev->bus_list.next = dev->bus_list.prev = NULL; | ||
40 | up_write(&pci_bus_sem); | 37 | up_write(&pci_bus_sem); |
41 | 38 | ||
42 | pci_free_resources(dev); | 39 | pci_free_resources(dev); |