[PATCH v2 05/11] PCI: Freeing saved list does not require holding pci_bus_sem

Ilpo Järvinen
2025-11-13T16:27:39Z

Freeing the saved list does not require holding pci_bus_sem, so the
critical section can be made shorter.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/pci/setup-bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 1a3d54563854..51f5e5a80b54 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -2513,8 +2513,8 @@ int pbus_reassign_bridge_resources(struct pci_bus *bus, struct resource *res)
pci_claim_resource(dev, i);
pci_setup_bridge(dev->subordinate);
}
- free_list(&saved);
up_read(&pci_bus_sem);
+ free_list(&saved);

return ret;
}
--
2.39.5