mm/mmap: Combine multiple if statements in vma_merge()
Currently vma_merge() searches from 0 upwards if there is no prev vma,
or from prev->vm_end if there is a prev vma. The check for merging with
prev also checks if prev exists. The ordering is not important at this
stage, so move the merging check above finding the next vma so that prev
can be checked only once.
Also start searching from vma_start as apposed to 0. If there is no
previous then there won't be a vma before vma_start. The code reads
more clearly this way.
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>