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

Wen Yang
2018-01-27T05:10:35Z

Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Tan Hu <tan.hu@zte.com.cn>
Suggested-by: Tejun Heo <tj@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: kernel test robot <xiaolong.ye@intel.com>
Cc: linux-kernel@vger.kernel.org
---
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