Thread (50 messages) 50 messages, 18 authors, 2025-08-01

Re: [PATCH 01/10] mm: rename call_mmap/mmap_prepare to vfs_mmap/mmap_prepare

From: Lorenzo Stoakes <hidden>
Date: 2025-06-17 05:31:06
Also in: ceph-devel, intel-gfx, linux-bcachefs, linux-btrfs, linux-cifs, linux-ext4, linux-f2fs-devel, linux-fsdevel, linux-mm, linux-nfs, linux-um, linux-unionfs, linux-xfs, lkml, ntfs3, nvdimm, ocfs2-devel, v9fs

On Mon, Jun 16, 2025 at 10:10:30PM -0700, Christoph Hellwig wrote:
On Mon, Jun 16, 2025 at 08:33:20PM +0100, Lorenzo Stoakes wrote:
quoted
The call_mmap() function violates the existing convention in
include/linux/fs.h whereby invocations of virtual file system hooks is
performed by functions prefixed with vfs_xxx().

Correct this by renaming call_mmap() to vfs_mmap(). This also avoids
confusion as to the fact that f_op->mmap_prepare may be invoked here.

Also rename __call_mmap_prepare() function to vfs_mmap_prepare() and adjust
to accept a file parameter, this is useful later for nested file systems.

Finally, fix up the VMA userland tests and ensure the mmap_prepare -> mmap
shim is implemented there.
Can we please just kill these silly call_* helpers instead?
The vfs_mmap() function now has some actual meaningful logic added in
commit bb666b7c2707 ("mm: add mmap_prepare() compatibility layer for nested
file systems").

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help