- if (unlikely(reacquire_kernel_lock(current) < 0)) {
- prev = rq->curr;
- switch_count = &prev->nivcsw;
-@@ -3324,8 +3429,9 @@ int task_prio(const struct task_struct *
++ if (unlikely(reacquire_kernel_lock(current) < 0)) {
++ prev = rq->curr;
++ switch_count = &prev->nivcsw;
+ goto need_resched_nonpreemptible;
++ }
++
+ preempt_enable_no_resched();
+- if (unlikely(test_thread_flag(TIF_NEED_RESCHED)))
++ if (need_resched())
+ goto need_resched;
+ }
+ EXPORT_SYMBOL(schedule);
+@@ -3066,8 +3176,9 @@ int task_prio(const struct task_struct *