Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

driver core: don't always lock parent in shutdown

Don't lock a parent device unless it is needed in device_shutdown. This
is in preparation for making device shutdown asynchronous, when it will
be needed to allow children of a common parent to shut down
simultaneously.

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Signed-off-by: David Jeffery <djeffery@redhat.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Tested-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20240822202805.6379-2-stuart.w.hayes@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Stuart Hayes and committed by
Greg Kroah-Hartman
ba635374 24e041e1

+2 -2
+2 -2
drivers/base/core.c
··· 4816 4816 spin_unlock(&devices_kset->list_lock); 4817 4817 4818 4818 /* hold lock to avoid race with probe/release */ 4819 - if (parent) 4819 + if (parent && dev->bus && dev->bus->need_parent_lock) 4820 4820 device_lock(parent); 4821 4821 device_lock(dev); 4822 4822 ··· 4840 4840 } 4841 4841 4842 4842 device_unlock(dev); 4843 - if (parent) 4843 + if (parent && dev->bus && dev->bus->need_parent_lock) 4844 4844 device_unlock(parent); 4845 4845 4846 4846 put_device(dev);