From: Michal Hocko <mhocko@kernel.org>
To: Geliang Tang <geliangtang@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
zijun_hu <zijun_hu@htc.com>, David Rientjes <rientjes@google.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Chris Wilson <chris@chris-wilson.co.uk>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/vmalloc.c: use rb_entry_safe
Date: Tue, 20 Dec 2016 15:35:54 +0100 [thread overview]
Message-ID: <20161220143554.GJ3769@dhcp22.suse.cz> (raw)
In-Reply-To: <81bb9820e5b9e4a1c596b3e76f88abf8c4a76cb0.1482221947.git.geliangtang@gmail.com>
On Tue 20-12-16 21:57:43, Geliang Tang wrote:
> Use rb_entry_safe() instead of open-coding it.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/vmalloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index a558438..b9999fc 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2309,7 +2309,7 @@ EXPORT_SYMBOL_GPL(free_vm_area);
> #ifdef CONFIG_SMP
> static struct vmap_area *node_to_va(struct rb_node *n)
> {
> - return n ? rb_entry(n, struct vmap_area, rb_node) : NULL;
> + return rb_entry_safe(n, struct vmap_area, rb_node);
> }
>
> /**
> --
> 2.9.3
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2016-12-20 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1e433cd03b01a3e89a22de5aa160b3442ff0cf16.1482222608.git.geliangtang@gmail.com>
2016-12-20 13:57 ` [PATCH] mm/vmalloc.c: use rb_entry_safe Geliang Tang
2016-12-20 14:35 ` Michal Hocko [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=20161220143554.GJ3769@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chris@chris-wilson.co.uk \
--cc=geliangtang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=vdavydov.dev@gmail.com \
--cc=zijun_hu@htc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).