--- initial
+++ final
@@ -1,103 +1,103 @@
 static void task_numa_compare(struct task_numa_env *env, long taskimp, long groupimp) {
   struct rq *src_rq = cpu_rq(env->src_cpu);
   struct rq *dst_rq = cpu_rq(env->dst_cpu);
   struct task_struct *cur;
   long src_load, dst_load;
   long load;
   long imp = env->p->numa_group ? groupimp : taskimp;
   long moveimp = imp;
   int dist = env->dist;
   rcu_read_lock();
   cur = task_rcu_dereference(&dst_rq->curr);
   if (cur && ((cur->flags & PF_EXITING) || is_idle_task(cur))) cur = NULL;
   /*
    * Because we have preemption enabled we can get migrated around and
    * end try selecting ourselves (current == env->p) as a swap candidate.
    */
   if (cur == env->p) goto unlock;
   /*
    * "imp" is the fault differential for the source task between the
    * source and destination node. Calculate the total differential for
    * the source task and potential destination task. The more negative
    * the value is, the more rmeote accesses that would be expected to
    * be incurred if the tasks were swapped.
    */
   if (cur) {
     /* Skip this swap candidate if cannot move to the source cpu */
-    if (!cpumask_test_cpu(env->src_cpu, tsk_cpus_allowed(cur))) goto unlock;
+    if (!cpumask_test_cpu(env->src_cpu, &cur->cpus_allowed)) goto unlock;
     /*
      * If dst and source tasks are in the same NUMA group, or not
      * in any group then look only at task weights.
      */
     if (cur->numa_group == env->p->numa_group) {
       imp = taskimp + task_weight(cur, env->src_nid, dist) - task_weight(cur, env->dst_nid, dist);
       /*
        * Add some hysteresis to prevent swapping the
        * tasks within a group over tiny differences.
        */
       if (cur->numa_group) imp -= imp / 16;
     } else {
       /*
        * Compare the group weights. If a task is all by
        * itself (not part of a group), use the task weight
        * instead.
        */
       if (cur->numa_group)
         imp += group_weight(cur, env->src_nid, dist) - group_weight(cur, env->dst_nid, dist);
       else
         imp += task_weight(cur, env->src_nid, dist) - task_weight(cur, env->dst_nid, dist);
     }
   }
   if (imp <= env->best_imp && moveimp <= env->best_imp) goto unlock;
   if (!cur) {
     /* Is there capacity at our destination? */
     if (env->src_stats.nr_running <= env->src_stats.task_capacity && !env->dst_stats.has_free_capacity) goto unlock;
     goto balance;
   }
   /* Balance doesn't matter much if we're running a task per cpu */
   if (imp > env->best_imp && src_rq->nr_running == 1 && dst_rq->nr_running == 1) goto assign;
   /*
    * In the overloaded case, try and keep the load balanced.
    */
 balance:
   load = task_h_load(env->p);
   dst_load = env->dst_stats.load + load;
   src_load = env->src_stats.load - load;
   if (moveimp > imp && moveimp > env->best_imp) {
     /*
      * If the improvement from just moving env->p direction is
      * better than swapping tasks around, check if a move is
      * possible. Store a slightly smaller score than moveimp,
      * so an actually idle CPU will win.
      */
     if (!load_too_imbalanced(src_load, dst_load, env)) {
       imp = moveimp - 1;
       cur = NULL;
       goto assign;
     }
   }
   if (imp <= env->best_imp) goto unlock;
   if (cur) {
     load = task_h_load(cur);
     dst_load -= load;
     src_load += load;
   }
   if (load_too_imbalanced(src_load, dst_load, env)) goto unlock;
   /*
    * One idle CPU per node is evaluated for a task numa move.
    * Call select_idle_sibling to maybe find a better one.
    */
   if (!cur) {
     /*
      * select_idle_siblings() uses an per-cpu cpumask that
      * can be used from IRQ context.
      */
     local_irq_disable();
     env->dst_cpu = select_idle_sibling(env->p, env->src_cpu, env->dst_cpu);
     local_irq_enable();
   }
 assign:
   task_numa_assign(env, cur, imp);
 unlock:
   rcu_read_unlock();
 }<sep>@@
expression current;
@@
-       tsk_cpus_allowed(current)
+       &current->cpus_allowed