|
@@ -795,36 +795,6 @@ static int mbind_range(struct mm_struct *mm, unsigned long start,
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
-/*
|
|
|
|
- * Update task->flags PF_MEMPOLICY bit: set iff non-default
|
|
|
|
- * mempolicy. Allows more rapid checking of this (combined perhaps
|
|
|
|
- * with other PF_* flag bits) on memory allocation hot code paths.
|
|
|
|
- *
|
|
|
|
- * If called from outside this file, the task 'p' should -only- be
|
|
|
|
- * a newly forked child not yet visible on the task list, because
|
|
|
|
- * manipulating the task flags of a visible task is not safe.
|
|
|
|
- *
|
|
|
|
- * The above limitation is why this routine has the funny name
|
|
|
|
- * mpol_fix_fork_child_flag().
|
|
|
|
- *
|
|
|
|
- * It is also safe to call this with a task pointer of current,
|
|
|
|
- * which the static wrapper mpol_set_task_struct_flag() does,
|
|
|
|
- * for use within this file.
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
-void mpol_fix_fork_child_flag(struct task_struct *p)
|
|
|
|
-{
|
|
|
|
- if (p->mempolicy)
|
|
|
|
- p->flags |= PF_MEMPOLICY;
|
|
|
|
- else
|
|
|
|
- p->flags &= ~PF_MEMPOLICY;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static void mpol_set_task_struct_flag(void)
|
|
|
|
-{
|
|
|
|
- mpol_fix_fork_child_flag(current);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/* Set the process memory policy */
|
|
/* Set the process memory policy */
|
|
static long do_set_mempolicy(unsigned short mode, unsigned short flags,
|
|
static long do_set_mempolicy(unsigned short mode, unsigned short flags,
|
|
nodemask_t *nodes)
|
|
nodemask_t *nodes)
|
|
@@ -861,7 +831,6 @@ static long do_set_mempolicy(unsigned short mode, unsigned short flags,
|
|
}
|
|
}
|
|
old = current->mempolicy;
|
|
old = current->mempolicy;
|
|
current->mempolicy = new;
|
|
current->mempolicy = new;
|
|
- mpol_set_task_struct_flag();
|
|
|
|
if (new && new->mode == MPOL_INTERLEAVE &&
|
|
if (new && new->mode == MPOL_INTERLEAVE &&
|
|
nodes_weight(new->v.nodes))
|
|
nodes_weight(new->v.nodes))
|
|
current->il_next = first_node(new->v.nodes);
|
|
current->il_next = first_node(new->v.nodes);
|