]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mmap: clean up mmap_region() unrolling
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 20 Jan 2023 16:26:38 +0000 (11:26 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 10 Feb 2023 00:51:36 +0000 (16:51 -0800)
commitcc8d1b097de78bd25b7b1ed32018b21cecbf3f6c
treeb6b7cf6fdeddfa5ca6554255c1278a414c1766b3
parentb373037fa9bb374f26bbabc0779fe990d02d33b7
mmap: clean up mmap_region() unrolling

Move logic of unrolling to the error path as apposed to duplicating it
within the function body.  This reduces the potential of missing an update
to one path when making changes.

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