diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f6cdbf755ed3..2fadd4896a14 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -170,6 +170,16 @@ static void __mem_cgroup_move_lists(struct page_cgroup *pc, bool active) | |||
170 | list_move(&pc->lru, &pc->mem_cgroup->inactive_list); | 170 | list_move(&pc->lru, &pc->mem_cgroup->inactive_list); |
171 | } | 171 | } |
172 | 172 | ||
173 | int task_in_mem_cgroup(struct task_struct *task, const struct mem_cgroup *mem) | ||
174 | { | ||
175 | int ret; | ||
176 | |||
177 | task_lock(task); | ||
178 | ret = task->mm && mm_cgroup(task->mm) == mem; | ||
179 | task_unlock(task); | ||
180 | return ret; | ||
181 | } | ||
182 | |||
173 | /* | 183 | /* |
174 | * This routine assumes that the appropriate zone's lru lock is already held | 184 | * This routine assumes that the appropriate zone's lru lock is already held |
175 | */ | 185 | */ |