projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93b0711
)
devcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup
author
Pavel Emelyanov
<
[email protected]
>
Fri, 6 Jun 2008 05:46:24 +0000
(22:46 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 6 Jun 2008 18:29:11 +0000
(11:29 -0700)
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 <
[email protected]
>
Acked-by: Serge Hallyn <
[email protected]
>
Cc: Paul Menage <
[email protected]
>
Cc: Balbir Singh <
[email protected]
>
Cc: James Morris <
[email protected]
>
Cc: Chris Wright <
[email protected]
>
Cc: Stephen Smalley <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
security/device_cgroup.c
patch
|
blob
|
history
diff --git
a/security/device_cgroup.c
b/security/device_cgroup.c
index 4ea583689eec0ae6cdb638d7ed025f25e9bac025..15f2f8003ba38844a5209d6e76cfe4a15dc28881 100644
(file)
--- 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;