aboutsummaryrefslogtreecommitdiffstats
path: root/fs/backing-file.c
diff options
context:
space:
mode:
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>2025-06-16 20:33:20 +0100
committerChristian Brauner <brauner@kernel.org>2025-06-17 13:35:23 +0200
commit20ca475d9860e14cf389f5a7d5ba9c6437d74613 (patch)
tree4363b7ad9f5126653402b9089fe4987677cf433a /fs/backing-file.c
parente04c78d86a9699d136910cfc0bdcf01087e3267e (diff)
downloadnet-20ca475d9860e14cf389f5a7d5ba9c6437d74613.tar.gz
mm: rename call_mmap/mmap_prepare to vfs_mmap/mmap_prepare
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. Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Link: https://lore.kernel.org/8d389f4994fa736aa8f9172bef8533c10a9e9011.1750099179.git.lorenzo.stoakes@oracle.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/backing-file.c')
-rw-r--r--fs/backing-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/backing-file.c b/fs/backing-file.c
index 763fbe9b72b227..04018679bf69bc 100644
--- a/fs/backing-file.c
+++ b/fs/backing-file.c
@@ -339,7 +339,7 @@ int backing_file_mmap(struct file *file, struct vm_area_struct *vma,
vma_set_file(vma, file);
old_cred = override_creds(ctx->cred);
- ret = call_mmap(vma->vm_file, vma);
+ ret = vfs_mmap(vma->vm_file, vma);
revert_creds(old_cred);
if (ctx->accessed)