[PATCH 1/2] workqueue: separate out and refactor the locking of applying attrs

2015-05-19 Thread Lai Jiangshan
Applying attrs requires two locks: get_online_cpus() and wq_pool_mutex, and this code is duplicated at two places (apply_workqueue_attrs() and workqueue_set_unbound_cpumask()). So we separate out this locking code into apply_wqattrs_[un]lock() and do a minor refactor on apply_workqueue_attrs().

[PATCH 1/2] workqueue: separate out and refactor the locking of applying attrs

2015-05-19 Thread Lai Jiangshan
Applying attrs requires two locks: get_online_cpus() and wq_pool_mutex, and this code is duplicated at two places (apply_workqueue_attrs() and workqueue_set_unbound_cpumask()). So we separate out this locking code into apply_wqattrs_[un]lock() and do a minor refactor on apply_workqueue_attrs().