Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1271835
| From | "Serge E. Hallyn" <serge.hallyn@ubuntu.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next |
| Date | 2015-11-18 04:50 +0100 |
| Message-ID | <qw1US-5MT-7@gated-at.bofh.it> (permalink) |
| References | <qvskp-7Yr-5@gated-at.bofh.it> <qvskp-7Yr-3@gated-at.bofh.it> <qvskr-7Yr-45@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Nov 16, 2015 at 09:46:33PM +0800, 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>
Seems reasonable.
Acked-by: Serge Hallyn <serge.hallyn@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;
>
> --
> 2.5.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next Geliang Tang <geliangtang@163.com> - 2015-11-16 14:50 +0100
[PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next Geliang Tang <geliangtang@163.com> - 2015-11-16 14:50 +0100
Re: [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next "Serge E. Hallyn" <serge.hallyn@ubuntu.com> - 2015-11-18 04:50 +0100
Re: [PATCH 3/3] apparmor: use list_next_entry instead of list_entry_next John Johansen <john.johansen@canonical.com> - 2015-11-18 06:10 +0100
Re: [PATCH 1/3] misc: mic/scif: use list_next_entry instead of list_entry_next Sudeep Dutt <sudeep.dutt@intel.com> - 2015-11-16 18:20 +0100
csiph-web