Skip to contentSkip to conversation

Fix declaration of cgroup_mm_owner_callbacks

PATCH In review Paul Menage 4 participants 7 messages Sep 15, 2008 – Sep 17, 2008 cgroup

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix declaration of cgroup_mm_owner_callbacks

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

---

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(-)
include/linux/cgroup.h +6 -9
Index: 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 */
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Paul Menage

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

Quoted 6 lines

---

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

#2 lore raw
In reply to Paul Menage
Quoted 7 lines · On Mon, 15 Sep 2008 12:06:38 -0700 (PDT) [email protected] (Paul Menage) wrote:

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

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

#3 lore raw
Quoted 5 lines · Andrew Morton
Quoted 2 lines · On Mon, 15 Sep 2008 12:06:38 -0700 (PDT) [email protected] (Paul Menage) wrote:

Fix declaration of cgroup_mm_owner_callbacks()

Quoted 8 lines
Quoted 5 lines

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

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

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

#4 lore raw
In reply to Andrew Morton
Quoted 5 lines · Andrew Morton
Quoted 2 lines · On Mon, 15 Sep 2008 12:06:38 -0700 (PDT) [email protected] (Paul Menage) wrote:

Fix declaration of cgroup_mm_owner_callbacks()

Quoted 8 lines
Quoted 5 lines

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

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

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?

Signature · 1 line
	Balbir
#5 lore raw
Quoted 11 lines · Balbir Singh
Quoted 10 lines · Andrew Morton
Quoted 7 lines · On Mon, 15 Sep 2008 12:06:38 -0700 (PDT) [email protected] (Paul Menage) wrote:

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

Quoted 5 lines
Quoted 2 lines

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

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).

Oh, I am already using it:

http://git.kernel.org/?p=linux/kernel/git/penberg/linux-2.6.git;a=commitdiff;h=3201a05704afafd7c61b204b7f0c2a9ddcf935d0

Still debugging some ext3 corruption problems, though :-)

Quoted 1 line

Pekka, Paul do you agree?

Yes, agreed.

#6 lore raw
In reply to Balbir Singh
Quoted 9 lines · Balbir Singh
Quoted 3 lines

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

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?

Yes, there's no rush for this.

Paul