All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
	Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] cgroup: remove bind() method from cgroup_subsys.
Date: Wed, 10 Apr 2013 14:41:17 +0300	[thread overview]
Message-ID: <1365594077-17655-1-git-send-email-ramirose@gmail.com> (raw)

The bind() method of cgroup_subsys is not used in any of the controllers
(cpuset, freezer, blkio, net_cls, memcg, net_prio, devices, perf, hugetlb, 
cpu and cpuacct)

Signed-off-by: Rami Rosen <ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 include/linux/cgroup.h | 2 --
 kernel/cgroup.c        | 4 ----
 2 files changed, 6 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 515927e..92acf86 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -483,8 +483,6 @@ struct cgroup_subsys {
 	void (*fork)(struct task_struct *task);
 	void (*exit)(struct cgroup *cgrp, struct cgroup *old_cgrp,
 		     struct task_struct *task);
-	void (*bind)(struct cgroup *root);
-
 	int subsys_id;
 	int active;
 	int disabled;
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index ba3e24a..fd38e1c 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1064,16 +1064,12 @@ static int rebind_subsystems(struct cgroupfs_root *root,
 			cgrp->subsys[i]->cgroup = cgrp;
 			list_move(&ss->sibling, &root->subsys_list);
 			ss->root = root;
-			if (ss->bind)
-				ss->bind(cgrp);
 			/* refcount was already taken, and we're keeping it */
 		} else if (bit & removed_mask) {
 			/* We're removing this subsystem */
 			BUG_ON(ss == NULL);
 			BUG_ON(cgrp->subsys[i] != dummytop->subsys[i]);
 			BUG_ON(cgrp->subsys[i]->cgroup != cgrp);
-			if (ss->bind)
-				ss->bind(dummytop);
 			dummytop->subsys[i]->cgroup = dummytop;
 			cgrp->subsys[i] = NULL;
 			subsys[i]->root = &rootnode;
-- 
1.8.1.4

             reply	other threads:[~2013-04-10 11:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 11:41 Rami Rosen [this message]
     [not found] ` <1365594077-17655-1-git-send-email-ramirose-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-04-10 17:50   ` [PATCH] cgroup: remove bind() method from cgroup_subsys Tejun Heo
     [not found]     ` <20130410175035.GA17641-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-04-11  2:02       ` Li Zefan
     [not found]         ` <5166199F.7090104-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-04-11  2:06           ` Tejun Heo
     [not found]             ` <CAOS58YP8V=GNrkRJN1G3EJrdVgK6NPcvm+30SW_xjC1Sq2QBng-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-11  7:02               ` Glauber Costa
     [not found]                 ` <5166600F.3090303-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2013-04-11  9:30                   ` Li Zefan
2013-04-11 18:49                   ` Tejun Heo
2013-04-12 17:24       ` Tejun Heo

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=1365594077-17655-1-git-send-email-ramirose@gmail.com \
    --to=ramirose-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.