From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Serge Hallyn <serue@us.ibm.com>, Paul Menage <menage@google.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] devcgroup: make a helper to convert cgroup_subsys_state to devs_cgroup
Date: Wed, 4 Jun 2008 08:41:16 -0500 [thread overview]
Message-ID: <20080604134116.GD16854@us.ibm.com> (raw)
In-Reply-To: <484645C1.6030108@openvz.org>
Quoting Pavel Emelyanov (xemul@openvz.org):
> 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>
Thanks, Pavel.
Acked-by: Serge Hallyn <serue@us.ibm.com>
to both, obviously.
-serge
> ---
> 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
prev parent reply other threads:[~2008-06-04 13:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=20080604134116.GD16854@us.ibm.com \
--to=serue@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=menage@google.com \
--cc=xemul@openvz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox