[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <81bb9820e5b9e4a1c596b3e76f88abf8c4a76cb0.1482221947.git.geliangtang@gmail.com>
Date: Tue, 20 Dec 2016 21:57:43 +0800
From: Geliang Tang <geliangtang@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
zijun_hu <zijun_hu@....com>,
David Rientjes <rientjes@...gle.com>,
Michal Hocko <mhocko@...e.com>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Chris Wilson <chris@...is-wilson.co.uk>
Cc: Geliang Tang <geliangtang@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] mm/vmalloc.c: use rb_entry_safe
Use rb_entry_safe() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@...il.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
Powered by blists - more mailing lists