mm: remove cgroup_mm_owner_callbacks
cgroup_mm_owner_callbacks() was brought in to support the memrlimit controller, but sneaked into mainline ahead of it. That controller has now been shelved, and the mm_owner_changed() args were inadequate for it anyway (they needed an mm pointer instead of a task pointer). Remove the dead code, and restore mm_update_next_owner() locking to how it was before: taking mmap_sem there does nothing for memcontrol.c, now the only user of mm->owner. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Paul Menage <menage@google.com> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
39f0dee2d8
commit
e5991371ee
@@ -329,13 +329,7 @@ struct cgroup_subsys {
|
||||
struct cgroup *cgrp);
|
||||
void (*post_clone)(struct cgroup_subsys *ss, struct cgroup *cgrp);
|
||||
void (*bind)(struct cgroup_subsys *ss, struct cgroup *root);
|
||||
/*
|
||||
* This routine is called with the task_lock of mm->owner held
|
||||
*/
|
||||
void (*mm_owner_changed)(struct cgroup_subsys *ss,
|
||||
struct cgroup *old,
|
||||
struct cgroup *new,
|
||||
struct task_struct *p);
|
||||
|
||||
int subsys_id;
|
||||
int active;
|
||||
int disabled;
|
||||
@@ -400,9 +394,6 @@ void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it);
|
||||
int cgroup_scan_tasks(struct cgroup_scanner *scan);
|
||||
int cgroup_attach_task(struct cgroup *, struct task_struct *);
|
||||
|
||||
void cgroup_mm_owner_callbacks(struct task_struct *old,
|
||||
struct task_struct *new);
|
||||
|
||||
#else /* !CONFIG_CGROUPS */
|
||||
|
||||
static inline int cgroup_init_early(void) { return 0; }
|
||||
@@ -420,9 +411,6 @@ static inline int cgroupstats_build(struct cgroupstats *stats,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static inline void cgroup_mm_owner_callbacks(struct task_struct *old,
|
||||
struct task_struct *new) {}
|
||||
|
||||
#endif /* !CONFIG_CGROUPS */
|
||||
|
||||
#endif /* _LINUX_CGROUP_H */
|
||||
|
Reference in New Issue
Block a user