@@ -6298,19 +6298,19 @@ static bool try_steal_cookie(int this, int that)
6298
6298
unsigned long cookie ;
6299
6299
bool success = false;
6300
6300
6301
- local_irq_disable ();
6302
- double_rq_lock (dst , src );
6301
+ guard ( irq ) ();
6302
+ guard ( double_rq_lock ) (dst , src );
6303
6303
6304
6304
cookie = dst -> core -> core_cookie ;
6305
6305
if (!cookie )
6306
- goto unlock ;
6306
+ return false ;
6307
6307
6308
6308
if (dst -> curr != dst -> idle )
6309
- goto unlock ;
6309
+ return false ;
6310
6310
6311
6311
p = sched_core_find (src , cookie );
6312
6312
if (!p )
6313
- goto unlock ;
6313
+ return false ;
6314
6314
6315
6315
do {
6316
6316
if (p == src -> core_pick || p == src -> curr )
@@ -6322,9 +6322,10 @@ static bool try_steal_cookie(int this, int that)
6322
6322
if (p -> core_occupation > dst -> idle -> core_occupation )
6323
6323
goto next ;
6324
6324
/*
6325
- * sched_core_find() and sched_core_next() will ensure that task @p
6326
- * is not throttled now, we also need to check whether the runqueue
6327
- * of the destination CPU is being throttled.
6325
+ * sched_core_find() and sched_core_next() will ensure
6326
+ * that task @p is not throttled now, we also need to
6327
+ * check whether the runqueue of the destination CPU is
6328
+ * being throttled.
6328
6329
*/
6329
6330
if (sched_task_is_throttled (p , this ))
6330
6331
goto next ;
@@ -6342,10 +6343,6 @@ static bool try_steal_cookie(int this, int that)
6342
6343
p = sched_core_next (p , cookie );
6343
6344
} while (p );
6344
6345
6345
- unlock :
6346
- double_rq_unlock (dst , src );
6347
- local_irq_enable ();
6348
-
6349
6346
return success ;
6350
6347
}
6351
6348
0 commit comments