diff options
author | Geliang Tang <geliangtang@gmail.com> | 2017-02-23 02:41:54 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-23 03:41:27 +0300 |
commit | 4583e77310a2edf39ee91099fba3cd153a22a77b (patch) | |
tree | 6292413ce4f65107d1dffaf64f4773aa56b12443 /mm/vmalloc.c | |
parent | 13ad59df67f19788f6c22985b1a33e466eceb643 (diff) | |
download | linux-4583e77310a2edf39ee91099fba3cd153a22a77b.tar.xz |
mm/vmalloc.c: use rb_entry_safe
Use rb_entry_safe() instead of open-coding it.
Link: http://lkml.kernel.org/r/81bb9820e5b9e4a1c596b3e76f88abf8c4a76cb0.1482221947.git.geliangtang@gmail.com
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 3ca82d44edd3..5f5b09e9dccd 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); } /** |