Re: [PATCH] Fix declaration of cgroup_mm_owner_callbacks

Previous thread: [PATCH -mm] aio: fix sysctl build error by Randy Dunlap on Monday, September 15, 2008 - 11:59 am. (1 message)

Next thread: [PATCH ?] ACPI: pr->id is unsigned by roel kluin on Monday, September 15, 2008 - 6:32 pm. (3 messages)
From: Paul Menage
Date: Monday, September 15, 2008 - 12:06 pm

Fix declaration of cgroup_mm_owner_callbacks()

The choice of real/dummy declaration for cgroup_mm_owner_callbacks()
shouldn't be based on CONFIG_MM_OWNER, but on
CONFIG_CGROUPS. Otherwise kernel/exit.c fails to compile when
something other than a cgroups controller selects CONFIG_MM_OWNER

Signed-off-by: Paul Menage <menage@google.com>

---

This is a retry with a mailer that hopefully didn't break the
whitespace formatting

 include/linux/cgroup.h |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Index: mmowner-mmotm-2008-09-10/include/linux/cgroup.h
===================================================================
--- mmowner-mmotm-2008-09-10.orig/include/linux/cgroup.h
+++ mmowner-mmotm-2008-09-10/include/linux/cgroup.h
@@ -403,6 +403,9 @@ void cgroup_iter_end(struct cgroup *cgrp
 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; }
@@ -421,15 +424,9 @@ static inline int cgroupstats_build(stru
 	return -EINVAL;
 }
 
+static inline void cgroup_mm_owner_callbacks(struct task_struct *old,
+					     struct task_struct *new) {}
+
 #endif /* !CONFIG_CGROUPS */
 
-#ifdef CONFIG_MM_OWNER
-extern void
-cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new);
-#else /* !CONFIG_MM_OWNER */
-static inline void
-cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new)
-{
-}
-#endif /* CONFIG_MM_OWNER */
 #endif /* _LINUX_CGROUP_H */
--

From: Pekka Enberg
Date: Monday, September 15, 2008 - 12:10 pm

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
--

From: Andrew Morton
Date: Wednesday, September 17, 2008 - 2:27 pm

On Mon, 15 Sep 2008 12:06:38 -0700 (PDT)

Being too lazy to go back and find out what "something" is, I assumed
that this isn't needed in 2.6.27.
--

From: Pekka Enberg
Date: Wednesday, September 17, 2008 - 2:24 pm

Something being the revokeat() patches I recently resurrected. So no, 
not for 2.6.27. :-)
--

From: Balbir Singh
Date: Wednesday, September 17, 2008 - 2:30 pm

We don't have anything using CONFIG_MM_OWNER in 2.6.27, so we should be OK
pushing this to 2.6.28 (Pekka plans to use it for revoke* calls).

Pekka, Paul do you agree?


-- 
	Balbir
--

From: Pekka Enberg
Date: Wednesday, September 17, 2008 - 2:39 pm

From: Paul Menage
Date: Wednesday, September 17, 2008 - 4:36 pm

Yes, there's no rush for this.

Paul
--

Previous thread: [PATCH -mm] aio: fix sysctl build error by Randy Dunlap on Monday, September 15, 2008 - 11:59 am. (1 message)

Next thread: [PATCH ?] ACPI: pr->id is unsigned by roel kluin on Monday, September 15, 2008 - 6:32 pm. (3 messages)