public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] devcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup
@ 2008-06-04  7:35 Pavel Emelyanov
  2008-06-04 13:41 ` Serge E. Hallyn
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2008-06-04  7:35 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Serge Hallyn, Paul Menage, Linux Kernel Mailing List

This is just picking the container_of out of cgroup_to_devcgroup into
a separate function.

This new css_to_devcgroup will be used in the 2nd patch.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

---
 security/device_cgroup.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 4ea5836..15f2f80 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -49,10 +49,14 @@ struct dev_cgroup {
 	spinlock_t lock;
 };
 
+static inline struct dev_cgroup *css_to_devcgroup(struct cgroup_subsys_state *s)
+{
+	return container_of(s, struct dev_cgroup, css);
+}
+
 static inline struct dev_cgroup *cgroup_to_devcgroup(struct cgroup *cgroup)
 {
-	return container_of(cgroup_subsys_state(cgroup, devices_subsys_id),
-			    struct dev_cgroup, css);
+	return css_to_devcgroup(cgroup_subsys_state(cgroup, devices_subsys_id));
 }
 
 struct cgroup_subsys devices_subsys;
-- 
1.5.3.4


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

end of thread, other threads:[~2008-06-04 13:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-04  7:35 [PATCH 1/2] devcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup Pavel Emelyanov
2008-06-04 13:41 ` Serge E. Hallyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox