mm/mmap: add inline vma_next() for readability of mmap code
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Sat, 17 Oct 2020 23:14:06 +0000 (16:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 18 Oct 2020 16:27:09 +0000 (09:27 -0700)
commit3903b55a6117ee5a8c90108beaf8d921474aa05a
tree4bdc04d5999b35923f276000b8abb60cd919599b
parent4dc200cee1950ac3f9b99f0c8d4a750b62958f81
mm/mmap: add inline vma_next() for readability of mmap code

There are three places that the next vma is required which uses the same
block of code.  Replace the block with a function and add comments on what
happens in the case where NULL is encountered.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20200818154707.2515169-1-Liam.Howlett@Oracle.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c