mm: add comments to do_mmap(), mmap_region() and vm_mmap()
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Thu, 12 Dec 2024 11:31:52 +0000 (11:31 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 14 Jan 2025 06:40:59 +0000 (22:40 -0800)
commit8ad946eb3df4ca1a243ce412e3e95f03b4468cbe
tree9bfb1033931c4a502e1968b5b958b4a93f423ee9
parentdf31155aff025171ae90cce91492e39b2cd5869b
mm: add comments to do_mmap(), mmap_region() and vm_mmap()

It isn't always entirely clear to users the difference between do_mmap(),
mmap_region() and vm_mmap(), so add comments to clarify what's going on in
each.

This is compounded by the fact that we actually allow callers external to
mm to invoke both do_mmap() and mmap_region() (!), the latter of which is
really strictly speaking an internal memory mapping implementation detail.

Link: https://lkml.kernel.org/r/20241212113152.28849-1-lorenzo.stoakes@oracle.com
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Jann Horn <jannh@google.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c
mm/util.c