File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -358,8 +358,6 @@ static void idxd_wq_disable_cleanup(struct idxd_wq *wq)
358
358
lockdep_assert_held (& wq -> wq_lock );
359
359
memset (wq -> wqcfg , 0 , idxd -> wqcfg_size );
360
360
wq -> type = IDXD_WQT_NONE ;
361
- wq -> size = 0 ;
362
- wq -> group = NULL ;
363
361
wq -> threshold = 0 ;
364
362
wq -> priority = 0 ;
365
363
wq -> ats_dis = 0 ;
@@ -371,6 +369,15 @@ static void idxd_wq_disable_cleanup(struct idxd_wq *wq)
371
369
wq -> max_batch_size = WQ_DEFAULT_MAX_BATCH ;
372
370
}
373
371
372
+ static void idxd_wq_device_reset_cleanup (struct idxd_wq * wq )
373
+ {
374
+ lockdep_assert_held (& wq -> wq_lock );
375
+
376
+ idxd_wq_disable_cleanup (wq );
377
+ wq -> size = 0 ;
378
+ wq -> group = NULL ;
379
+ }
380
+
374
381
static void idxd_wq_ref_release (struct percpu_ref * ref )
375
382
{
376
383
struct idxd_wq * wq = container_of (ref , struct idxd_wq , wq_active );
@@ -689,6 +696,7 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd)
689
696
690
697
if (wq -> state == IDXD_WQ_ENABLED ) {
691
698
idxd_wq_disable_cleanup (wq );
699
+ idxd_wq_device_reset_cleanup (wq );
692
700
wq -> state = IDXD_WQ_DISABLED ;
693
701
}
694
702
}
You can’t perform that action at this time.
0 commit comments