@@ -5342,17 +5342,13 @@ static int apply_workqueue_attrs_locked(struct workqueue_struct *wq,
5342
5342
*
5343
5343
* Performs GFP_KERNEL allocations.
5344
5344
*
5345
- * Assumes caller has CPU hotplug read exclusion, i.e. cpus_read_lock().
5346
- *
5347
5345
* Return: 0 on success and -errno on failure.
5348
5346
*/
5349
5347
int apply_workqueue_attrs (struct workqueue_struct * wq ,
5350
5348
const struct workqueue_attrs * attrs )
5351
5349
{
5352
5350
int ret ;
5353
5351
5354
- lockdep_assert_cpus_held ();
5355
-
5356
5352
mutex_lock (& wq_pool_mutex );
5357
5353
ret = apply_workqueue_attrs_locked (wq , attrs );
5358
5354
mutex_unlock (& wq_pool_mutex );
@@ -5434,7 +5430,6 @@ static int alloc_and_link_pwqs(struct workqueue_struct *wq)
5434
5430
bool highpri = wq -> flags & WQ_HIGHPRI ;
5435
5431
int cpu , ret ;
5436
5432
5437
- lockdep_assert_cpus_held ();
5438
5433
lockdep_assert_held (& wq_pool_mutex );
5439
5434
5440
5435
wq -> cpu_pwq = alloc_percpu (struct pool_workqueue * );
@@ -5695,8 +5690,7 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
5695
5690
5696
5691
/*
5697
5692
* wq_pool_mutex protects the workqueues list, allocations of PWQs,
5698
- * and the global freeze state. alloc_and_link_pwqs() also requires
5699
- * cpus_read_lock() for PWQs' affinities.
5693
+ * and the global freeze state.
5700
5694
*/
5701
5695
apply_wqattrs_lock ();
5702
5696
@@ -6862,8 +6856,7 @@ static int workqueue_apply_unbound_cpumask(const cpumask_var_t unbound_cpumask)
6862
6856
* @exclude_cpumask: the cpumask to be excluded from wq_unbound_cpumask
6863
6857
*
6864
6858
* This function can be called from cpuset code to provide a set of isolated
6865
- * CPUs that should be excluded from wq_unbound_cpumask. The caller must hold
6866
- * either cpus_read_lock or cpus_write_lock.
6859
+ * CPUs that should be excluded from wq_unbound_cpumask.
6867
6860
*/
6868
6861
int workqueue_unbound_exclude_cpumask (cpumask_var_t exclude_cpumask )
6869
6862
{
@@ -6873,7 +6866,6 @@ int workqueue_unbound_exclude_cpumask(cpumask_var_t exclude_cpumask)
6873
6866
if (!zalloc_cpumask_var (& cpumask , GFP_KERNEL ))
6874
6867
return - ENOMEM ;
6875
6868
6876
- lockdep_assert_cpus_held ();
6877
6869
mutex_lock (& wq_pool_mutex );
6878
6870
6879
6871
/*
0 commit comments