From: John Johansen <john.johansen@canonical.com>
To: Geliang Tang <geliangtang@163.com>,
James Morris <james.l.morris@oracle.com>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next
Date: Tue, 17 Nov 2015 21:09:18 -0800 [thread overview]
Message-ID: <564C07FE.5030603@canonical.com> (raw)
In-Reply-To: <650feb5d0507cc448a2663287a209464f71612f0.1447681244.git.geliangtang@163.com>
On 11/16/2015 05:46 AM, Geliang Tang wrote:
> list_next_entry has been defined in list.h, so I replace list_entry_next
> with it.
>
> Signed-off-by: Geliang Tang <geliangtang@163.com>
yep looks good
Acked-by: John Johansen <john.johansen@canonical.com>
> ---
> security/apparmor/apparmorfs.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
> index ad4fa49..7a00bb7 100644
> --- a/security/apparmor/apparmorfs.c
> +++ b/security/apparmor/apparmorfs.c
> @@ -550,8 +550,6 @@ fail2:
> }
>
>
> -#define list_entry_next(pos, member) \
> - list_entry(pos->member.next, typeof(*pos), member)
> #define list_entry_is_head(pos, head, member) (&pos->member == (head))
>
> /**
> @@ -582,7 +580,7 @@ static struct aa_namespace *__next_namespace(struct aa_namespace *root,
> parent = ns->parent;
> while (ns != root) {
> mutex_unlock(&ns->lock);
> - next = list_entry_next(ns, base.list);
> + next = list_next_entry(ns, base.list);
> if (!list_entry_is_head(next, &parent->sub_ns, base.list)) {
> mutex_lock(&next->lock);
> return next;
> @@ -636,7 +634,7 @@ static struct aa_profile *__next_profile(struct aa_profile *p)
> parent = rcu_dereference_protected(p->parent,
> mutex_is_locked(&p->ns->lock));
> while (parent) {
> - p = list_entry_next(p, base.list);
> + p = list_next_entry(p, base.list);
> if (!list_entry_is_head(p, &parent->base.profiles, base.list))
> return p;
> p = parent;
> @@ -645,7 +643,7 @@ static struct aa_profile *__next_profile(struct aa_profile *p)
> }
>
> /* is next another profile in the namespace */
> - p = list_entry_next(p, base.list);
> + p = list_next_entry(p, base.list);
> if (!list_entry_is_head(p, &ns->base.profiles, base.list))
> return p;
>
>
next prev parent reply other threads:[~2015-11-18 5:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-16 13:46 [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next Geliang Tang
2015-11-16 13:46 ` [PATCH 2/3] libceph: " Geliang Tang
2015-11-16 13:46 ` [PATCH 3/3] apparmor: " Geliang Tang
2015-11-18 3:44 ` Serge E. Hallyn
2015-11-18 5:09 ` John Johansen [this message]
2015-11-17 16:27 ` [PATCH 2/3] libceph: " Ilya Dryomov
2015-11-16 17:08 ` [PATCH 1/3] misc: mic/scif: " Sudeep Dutt
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=564C07FE.5030603@canonical.com \
--to=john.johansen@canonical.com \
--cc=geliangtang@163.com \
--cc=james.l.morris@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.com \
/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.