diff --git a/sys/compat/linuxkpi/common/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h --- a/sys/compat/linuxkpi/common/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h @@ -43,6 +43,7 @@ #include #include #include +#include #include struct module; diff --git a/sys/compat/linuxkpi/common/include/linux/mount.h b/sys/compat/linuxkpi/common/include/linux/mount.h new file mode 100644 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/linux/mount.h @@ -0,0 +1,14 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 The FreeBSD Foundation + * Copyright (c) 2026 Jean-Sébastien Pédron + */ + +#ifndef _LINUXKPI_LINUX_MOUNT_H_ +#define _LINUXKPI_LINUX_MOUNT_H_ + +struct vfsmount { +}; + +#endif diff --git a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h --- a/sys/compat/linuxkpi/common/include/linux/shmem_fs.h +++ b/sys/compat/linuxkpi/common/include/linux/shmem_fs.h @@ -39,6 +39,8 @@ gfp_t gfp); struct linux_file *linux_shmem_file_setup(const char *name, loff_t size, unsigned long flags); +struct linux_file *linux_shmem_file_setup_with_mnt(struct vfsmount *mount, + const char *name, loff_t size, unsigned long flags); void linux_shmem_truncate_range(vm_object_t obj, loff_t lstart, loff_t lend); @@ -51,6 +53,9 @@ #define shmem_file_setup(...) \ linux_shmem_file_setup(__VA_ARGS__) +#define shmem_file_setup_with_mnt(...) \ + linux_shmem_file_setup_with_mnt(__VA_ARGS__) + #define shmem_truncate_range(...) \ linux_shmem_truncate_range(__VA_ARGS__) diff --git a/sys/compat/linuxkpi/common/src/linux_shmemfs.c b/sys/compat/linuxkpi/common/src/linux_shmemfs.c --- a/sys/compat/linuxkpi/common/src/linux_shmemfs.c +++ b/sys/compat/linuxkpi/common/src/linux_shmemfs.c @@ -93,6 +93,15 @@ return (ERR_PTR(error)); } +struct linux_file * +linux_shmem_file_setup_with_mnt(struct vfsmount *mount, + const char *name, loff_t size, unsigned long flags) +{ + pr_debug("%s: TODO\n", __func__); + + return (linux_shmem_file_setup(name, size, flags)); +} + static vm_ooffset_t linux_invalidate_mapping_pages_sub(vm_object_t obj, vm_pindex_t start, vm_pindex_t end, int flags)