LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] cgroup: tiny cleanups
@ 2008-10-20  5:30 Li Zefan
  2008-10-20 20:31 ` Paul Menage
  0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2008-10-20  5:30 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Paul Menage, LKML, Linux Containers

- remove 'private' field from struct subsys
- remove cgroup_init_smp()
- remove unused 'i' in cgroup_tasks_start()

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
 include/linux/cgroup.h |    4 ----
 kernel/cgroup.c        |    1 -
 2 files changed, 5 deletions(-)

--- linux-mm/include/linux/cgroup.h.orig	2008-10-20 13:25:39.000000000 +0800
+++ linux-mm/include/linux/cgroup.h	2008-10-20 13:26:08.000000000 +0800
@@ -25,7 +25,6 @@ struct cgroup;
 
 extern int cgroup_init_early(void);
 extern int cgroup_init(void);
-extern void cgroup_init_smp(void);
 extern void cgroup_lock(void);
 extern bool cgroup_lock_live_group(struct cgroup *cgrp);
 extern void cgroup_unlock(void);
@@ -348,8 +347,6 @@ struct cgroup_subsys {
 	struct cgroupfs_root *root;
 
 	struct list_head sibling;
-
-	void *private;
 };
 
 #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
@@ -410,7 +407,6 @@ void cgroup_mm_owner_callbacks(struct ta
 
 static inline int cgroup_init_early(void) { return 0; }
 static inline int cgroup_init(void) { return 0; }
-static inline void cgroup_init_smp(void) {}
 static inline void cgroup_fork(struct task_struct *p) {}
 static inline void cgroup_fork_callbacks(struct task_struct *p) {}
 static inline void cgroup_post_fork(struct task_struct *p) {}
--- linux-mm/kernel/cgroup.c.orig	2008-10-20 13:25:56.000000000 +0800
+++ linux-mm/kernel/cgroup.c	2008-10-20 13:26:08.000000000 +0800
@@ -2104,7 +2104,6 @@ static void *cgroup_tasks_start(struct s
 	down_read(&cgrp->pids_mutex);
 	if (pid) {
 		int end = cgrp->pids_length;
-		int i;
 		while (index < end) {
 			int mid = (index + end) / 2;
 			if (cgrp->tasks_pids[mid] == pid) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] cgroup: tiny cleanups
  2008-10-20  5:30 [PATCH] cgroup: tiny cleanups Li Zefan
@ 2008-10-20 20:31 ` Paul Menage
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Menage @ 2008-10-20 20:31 UTC (permalink / raw)
  To: Li Zefan; +Cc: Andrew Morton, LKML, Linux Containers

On Sun, Oct 19, 2008 at 10:30 PM, Li Zefan <lizf@cn.fujitsu.com> wrote:
> - remove 'private' field from struct subsys
> - remove cgroup_init_smp()
> - remove unused 'i' in cgroup_tasks_start()
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>

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

Thanks. The cgroup_subsys.private field was originally for some
experiments for automatically emulating CKRM/BeanCounters over early
versions of cgroups, but I don't think anything is using it currently.

Paul

> ---
>  include/linux/cgroup.h |    4 ----
>  kernel/cgroup.c        |    1 -
>  2 files changed, 5 deletions(-)
>
> --- linux-mm/include/linux/cgroup.h.orig        2008-10-20 13:25:39.000000000 +0800
> +++ linux-mm/include/linux/cgroup.h     2008-10-20 13:26:08.000000000 +0800
> @@ -25,7 +25,6 @@ struct cgroup;
>
>  extern int cgroup_init_early(void);
>  extern int cgroup_init(void);
> -extern void cgroup_init_smp(void);
>  extern void cgroup_lock(void);
>  extern bool cgroup_lock_live_group(struct cgroup *cgrp);
>  extern void cgroup_unlock(void);
> @@ -348,8 +347,6 @@ struct cgroup_subsys {
>        struct cgroupfs_root *root;
>
>        struct list_head sibling;
> -
> -       void *private;
>  };
>
>  #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
> @@ -410,7 +407,6 @@ void cgroup_mm_owner_callbacks(struct ta
>
>  static inline int cgroup_init_early(void) { return 0; }
>  static inline int cgroup_init(void) { return 0; }
> -static inline void cgroup_init_smp(void) {}
>  static inline void cgroup_fork(struct task_struct *p) {}
>  static inline void cgroup_fork_callbacks(struct task_struct *p) {}
>  static inline void cgroup_post_fork(struct task_struct *p) {}
> --- linux-mm/kernel/cgroup.c.orig       2008-10-20 13:25:56.000000000 +0800
> +++ linux-mm/kernel/cgroup.c    2008-10-20 13:26:08.000000000 +0800
> @@ -2104,7 +2104,6 @@ static void *cgroup_tasks_start(struct s
>        down_read(&cgrp->pids_mutex);
>        if (pid) {
>                int end = cgrp->pids_length;
> -               int i;
>                while (index < end) {
>                        int mid = (index + end) / 2;
>                        if (cgrp->tasks_pids[mid] == pid) {
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-20 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-20  5:30 [PATCH] cgroup: tiny cleanups Li Zefan
2008-10-20 20:31 ` Paul Menage

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).