summaryrefslogtreecommitdiff
path: root/mm/util.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-11 00:24:00 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-02-11 00:24:00 +0100
commitb2a3b193b7eb886e44f8a66cd41a26cc44c1e00d (patch)
tree8edbfe1daaa8d75214f6017070740d1f4acbafc5 /mm/util.c
parentc89f2682a39192433c296bf97b834fd2815a758b (diff)
parent6a0712f6f199e737aa5913d28ec4bd3a25de9660 (diff)
Merge branch 'pm-opp' into pm-cpufreq
Diffstat (limited to 'mm/util.c')
-rw-r--r--mm/util.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/mm/util.c b/mm/util.c
index c108a6542d05..4fb14ca5a419 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -230,36 +230,11 @@ void __vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
}
/* Check if the vma is being used as a stack by this task */
-static int vm_is_stack_for_task(struct task_struct *t,
- struct vm_area_struct *vma)
+int vma_is_stack_for_task(struct vm_area_struct *vma, struct task_struct *t)
{
return (vma->vm_start <= KSTK_ESP(t) && vma->vm_end >= KSTK_ESP(t));
}
-/*
- * Check if the vma is being used as a stack.
- * If is_group is non-zero, check in the entire thread group or else
- * just check in the current task. Returns the task_struct of the task
- * that the vma is stack for. Must be called under rcu_read_lock().
- */
-struct task_struct *task_of_stack(struct task_struct *task,
- struct vm_area_struct *vma, bool in_group)
-{
- if (vm_is_stack_for_task(task, vma))
- return task;
-
- if (in_group) {
- struct task_struct *t;
-
- for_each_thread(task, t) {
- if (vm_is_stack_for_task(t, vma))
- return t;
- }
- }
-
- return NULL;
-}
-
#if defined(CONFIG_MMU) && !defined(HAVE_ARCH_PICK_MMAP_LAYOUT)
void arch_pick_mmap_layout(struct mm_struct *mm)
{