File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -4933,9 +4933,7 @@ static void do_sched_yield(void)
4933
4933
struct rq_flags rf ;
4934
4934
struct rq * rq ;
4935
4935
4936
- local_irq_disable ();
4937
- rq = this_rq ();
4938
- rq_lock (rq , & rf );
4936
+ rq = this_rq_lock_irq (& rf );
4939
4937
4940
4938
schedstat_inc (rq -> yld_count );
4941
4939
current -> sched_class -> yield_task (rq );
Original file line number Diff line number Diff line change @@ -1157,6 +1157,18 @@ rq_unlock(struct rq *rq, struct rq_flags *rf)
1157
1157
raw_spin_unlock (& rq -> lock );
1158
1158
}
1159
1159
1160
+ static inline struct rq *
1161
+ this_rq_lock_irq (struct rq_flags * rf )
1162
+ __acquires (rq - > lock )
1163
+ {
1164
+ struct rq * rq ;
1165
+
1166
+ local_irq_disable ();
1167
+ rq = this_rq ();
1168
+ rq_lock (rq , rf );
1169
+ return rq ;
1170
+ }
1171
+
1160
1172
#ifdef CONFIG_NUMA
1161
1173
enum numa_topology_type {
1162
1174
NUMA_DIRECT ,
You can’t perform that action at this time.
0 commit comments