the wq_update_unbound_numa_attrs_buf will be useful, only when the wq_numa_enabled is true. if there is something wrong to cause the wq_numa_enable false, it can just return without the wq_update_unbound_numa_attrs_buf allocation.
This doesn't introduce any functional changes. Signed-off-by: wanghaibin <[email protected]> --- kernel/workqueue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index c579dba..d6cbe3d 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5180,9 +5180,6 @@ static void __init wq_numa_init(void) return; } - wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL); - BUG_ON(!wq_update_unbound_numa_attrs_buf); - /* * We want masks of possible CPUs of each node which isn't readily * available. Build one from cpu_to_node() which should have been @@ -5207,6 +5204,9 @@ static void __init wq_numa_init(void) wq_numa_possible_cpumask = tbl; wq_numa_enabled = true; + + wq_update_unbound_numa_attrs_buf = alloc_workqueue_attrs(GFP_KERNEL); + BUG_ON(!wq_update_unbound_numa_attrs_buf); } static int __init init_workqueues(void) -- 1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

