diff --git a/mm/shmem.c b/mm/shmem.c index 79a7cab733af..099c26f8073e 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -89,6 +89,10 @@ static struct vfsmount *shm_mnt; #include "internal.h" +#ifdef CONFIG_MEMFD_ASHMEM_SHIM +#include "memfd-ashmem-shim.h" +#endif + #define BLOCKS_PER_PAGE (PAGE_SIZE/512) #define VM_ACCT(size) (PAGE_ALIGN(size) >> PAGE_SHIFT) @@ -4506,6 +4510,12 @@ static const struct file_operations shmem_file_operations = { .splice_write = iter_file_splice_write, .fallocate = shmem_fallocate, #endif +#ifdef CONFIG_MEMFD_ASHMEM_SHIM + .unlocked_ioctl = memfd_ashmem_shim_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = memfd_ashmem_shim_compat_ioctl, +#endif +#endif }; static const struct inode_operations shmem_inode_operations = {