From: Arnd Bergmann Date: Sat, 3 Jul 2010 22:02:28 +0000 (+0200) Subject: PCI: kill BKL in /proc/pci X-Git-Tag: firefly_0821_release~7613^2~3585^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=991f739544a0923b70fb69b115edb880ff9fcc4a;p=firefly-linux-kernel-4.4.55.git PCI: kill BKL in /proc/pci All operations in the pci procfs ioctl functions are atomic, so no lock is needed here. Also add a compat_ioctl method, since all the commands are compatible in 32 bit mode. Signed-off-by: Arnd Bergmann Cc: Jesse Barnes Cc: Tejun Heo Cc: linux-pci@vger.kernel.org Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index 01f0306525a5..297b72c880a1 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c @@ -212,8 +212,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, #endif /* HAVE_PCI_MMAP */ int ret = 0; - lock_kernel(); - switch (cmd) { case PCIIOC_CONTROLLER: ret = pci_domain_nr(dev->bus); @@ -242,7 +240,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, break; }; - unlock_kernel(); return ret; } @@ -306,6 +303,7 @@ static const struct file_operations proc_bus_pci_operations = { .read = proc_bus_pci_read, .write = proc_bus_pci_write, .unlocked_ioctl = proc_bus_pci_ioctl, + .compat_ioctl = proc_bus_pci_ioctl, #ifdef HAVE_PCI_MMAP .open = proc_bus_pci_open, .release = proc_bus_pci_release,