From: menage@google.com (Paul Menage)
To: akpm@linux-foundation.org, balbir@linux.vnet.ibm.com,
penberg@cs.helsinki.fi
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Fix declaration of cgroup_mm_owner_callbacks
Date: Mon, 15 Sep 2008 12:06:38 -0700 (PDT) [thread overview]
Message-ID: <20080915190638.99E613D6952@localhost> (raw)
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 */
next reply other threads:[~2008-09-15 19:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 19:06 Paul Menage [this message]
2008-09-15 19:10 ` [PATCH] Fix declaration of cgroup_mm_owner_callbacks Pekka Enberg
2008-09-17 21:27 ` Andrew Morton
2008-09-17 21:24 ` Pekka Enberg
2008-09-17 21:30 ` Balbir Singh
2008-09-17 21:39 ` Pekka Enberg
2008-09-17 23:36 ` Paul Menage
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080915190638.99E613D6952@localhost \
--to=menage@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox