diff options
author | Wei Yang <richardw.yang@linux.intel.com> | 2019-09-24 00:39:25 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-25 00:54:12 +0200 |
commit | 73848a9711105836346462e1d3c6b5765b452de1 (patch) | |
tree | 1b564f7f54f5990bdbe3e84ebcf1324a9915e9d6 /tools/objtool/cfi.h | |
parent | riscv: make mmap allocation top-down by default (diff) | |
download | linux-73848a9711105836346462e1d3c6b5765b452de1.tar.xz linux-73848a9711105836346462e1d3c6b5765b452de1.zip |
mm/mmap.c: refine find_vma_prev() with rb_last()
When addr is out of range of the whole rb_tree, pprev will point to the
right-most node. rb_tree facility already provides a helper function,
rb_last(), to do this task. We can leverage this instead of
reimplementing it.
This patch refines find_vma_prev() with rb_last() to make it a little
nicer to read.
[akpm@linux-foundation.org: little cleanup, per Vlastimil]
Link: http://lkml.kernel.org/r/20190809001928.4950-1-richardw.yang@linux.intel.com
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools/objtool/cfi.h')
0 files changed, 0 insertions, 0 deletions