Merge branch 'for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[muen/linux.git] / kernel / workqueue.c
index 636c6d702b933084d74e1070bed4473dc21d8aca..ca7959be8aaa1bf4bd6f540c54db614974db8586 100644 (file)
@@ -3070,14 +3070,6 @@ static bool __cancel_work(struct work_struct *work, bool is_dwork)
        return ret;
 }
 
-/*
- * See cancel_delayed_work()
- */
-bool cancel_work(struct work_struct *work)
-{
-       return __cancel_work(work, false);
-}
-
 /**
  * cancel_delayed_work - cancel a delayed work
  * @dwork: delayed_work to cancel
@@ -5389,7 +5381,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
 
        ret = device_register(&wq_dev->dev);
        if (ret) {
-               kfree(wq_dev);
+               put_device(&wq_dev->dev);
                wq->wq_dev = NULL;
                return ret;
        }
@@ -5633,12 +5625,13 @@ static void __init wq_numa_init(void)
 int __init workqueue_init_early(void)
 {
        int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL };
+       int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ;
        int i, cpu;
 
        WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
 
        BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
-       cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN));
+       cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(hk_flags));
 
        pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);