Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1545123
| From | Geliang Tang <geliangtang@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mm/vmalloc.c: use rb_entry_safe |
| Date | 2016-12-20 15:00 +0100 |
| Message-ID | <sQt7r-6hV-29@gated-at.bofh.it> (permalink) |
| References | <sQt7r-6hV-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Use rb_entry_safe() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@gmail.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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mm/vmalloc.c: use rb_entry_safe Geliang Tang <geliangtang@gmail.com> - 2016-12-20 15:00 +0100 Re: [PATCH] mm/vmalloc.c: use rb_entry_safe Michal Hocko <mhocko@kernel.org> - 2016-12-20 15:40 +0100
csiph-web