[PATCH 07/16] doc: update porting, vfs documentation for mmap_[complete, abort]
Randy Dunlap
rdunlap at infradead.org
Mon Sep 8 16:17:16 PDT 2025
Hi--
On 9/8/25 4:10 AM, Lorenzo Stoakes wrote:
> We have introduced the mmap_complete() and mmap_abort() callbacks, which
> work in conjunction with mmap_prepare(), so describe what they used for.
>
> We update both the VFS documentation and the porting guide.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
> ---
> Documentation/filesystems/porting.rst | 9 +++++++
> Documentation/filesystems/vfs.rst | 35 +++++++++++++++++++++++++++
> 2 files changed, 44 insertions(+)
>
> diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst
> index 486a91633474..172d36a13e13 100644
> --- a/Documentation/filesystems/vfs.rst
> +++ b/Documentation/filesystems/vfs.rst
> @@ -1236,6 +1240,37 @@ otherwise noted.
> file-backed memory mapping, most notably establishing relevant
> private state and VMA callbacks.
>
> +``mmap_complete``
> + If mmap_prepare is provided, will be invoked after the mapping is fully
s/mmap_prepare/mmap_complete/ ??
> + established, with the mmap and VMA write locks held.
> +
> + It is useful for prepopulating VMAs before they may be accessed by
> + users.
> +
> + The hook MUST NOT release either the VMA or mmap write locks. This is
You could also do **bold** above:
The hook **MUST NOT** release ...
> + asserted by the mmap logic.
> +
> + If an error is returned by the hook, the VMA is unmapped and the
> + mmap() operation fails with that error.
> +
> + It is not valid to specify this hook if mmap_prepare is not also
> + specified, doing so will result in an error upon mapping.
--
~Randy
More information about the kexec
mailing list