mm/mmap: use vma_prepare() and vma_complete() in vma_expand()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 20 Jan 2023 16:26:42 +0000 (11:26 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 10 Feb 2023 00:51:37 +0000 (16:51 -0800)
commit9303d3e1c3f8d8863d561a070489cf44ce5e4103
tree8d96b19261c8800a0f625bd0a2eb208183fe1a4c
parent440703e082b9c79c3d4fffcca8c2dffd621e6dc5
mm/mmap: use vma_prepare() and vma_complete() in vma_expand()

Use the new locking functions for vma_expand().  This reduces code
duplication.

At the same time change VM_BUG_ON() to VM_WARN_ON()

Link: https://lkml.kernel.org/r/20230120162650.984577-42-Liam.Howlett@oracle.com
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c