[RFC PATCH V5 2/5] workqueue: expose attrs for system workqueues

From: Wen Yang
Date: Sat Jan 27 2018 - 00:10:39 EST


Signed-off-by: Wen Yang <wen.yang99@xxxxxxxxxx>
Signed-off-by: Jiang Biao <jiang.biao2@xxxxxxxxxx>
Signed-off-by: Tan Hu <tan.hu@xxxxxxxxxx>
Suggested-by: Tejun Heo <tj@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Lai Jiangshan <jiangshanlai@xxxxxxxxx>
Cc: kernel test robot <xiaolong.ye@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
kernel/workqueue.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 67b68bb..d5a5c76 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5254,7 +5254,11 @@ static int __init wq_sysfs_init(void)
if (err)
return err;

- return device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr);
+ err = device_create_file(wq_subsys.dev_root, &wq_sysfs_cpumask_attr);
+ if (err)
+ return err;
+ return workqueue_sysfs_register(system_wq) ||
+ workqueue_sysfs_register(system_highpri_wq);
}
core_initcall(wq_sysfs_init);

--
1.8.3.1