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.

workqueue: move to use bus_get_dev_root()

Direct access to the struct bus_type dev_root pointer is going away soon
so replace that with a call to bus_get_dev_root() instead, which is what
it is there for.

Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20230313182918.1312597-8-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+7 -1
+7 -1
kernel/workqueue.c
··· 5826 5826 5827 5827 static int __init wq_sysfs_init(void) 5828 5828 { 5829 + struct device *dev_root; 5829 5830 int err; 5830 5831 5831 5832 err = subsys_virtual_register(&wq_subsys, NULL); 5832 5833 if (err) 5833 5834 return err; 5834 5835 5835 - return device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr); 5836 + dev_root = bus_get_dev_root(&wq_subsys); 5837 + if (dev_root) { 5838 + err = device_create_file(dev_root, &wq_sysfs_cpumask_attr); 5839 + put_device(dev_root); 5840 + } 5841 + return err; 5836 5842 } 5837 5843 core_initcall(wq_sysfs_init); 5838 5844