#include <linux/fs.h>
#include <linux/init.h>
#include <linux/vfs.h>
#include <linux/mount.h>
#include <linux/ramfs.h>
#include <linux/pagemap.h>
#include <linux/file.h>
#include <linux/fileattr.h>
#include <linux/mm.h>
#include <linux/random.h>
#include <linux/sched/signal.h>
#include <linux/export.h>
#include <linux/shmem_fs.h>
#include <linux/swap.h>
#include <linux/uio.h>
#include <linux/hugetlb.h>
#include <linux/fs_parser.h>
#include <linux/swapfile.h>
#include <linux/iversion.h>
#include "swap.h"
static struct vfsmount *shm_mnt __ro_after_init;
#ifdef CONFIG_SHMEM
#include <linux/xattr.h>
#include <linux/exportfs.h>
#include <linux/posix_acl.h>
#include <linux/posix_acl_xattr.h>
#include <linux/mman.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/backing-dev.h>
#include <linux/writeback.h>
#include <linux/pagevec.h>
#include <linux/percpu_counter.h>
#include <linux/falloc.h>
#include <linux/splice.h>
#include <linux/security.h>
#include <linux/swapops.h>
#include <linux/mempolicy.h>
#include <linux/namei.h>
#include <linux/ctype.h>
#include <linux/migrate.h>
#include <linux/highmem.h>
#include <linux/seq_file.h>
#include <linux/magic.h>
#include <linux/syscalls.h>
#include <linux/fcntl.h>
#include <uapi/linux/memfd.h>
#include <linux/rmap.h>
#include <linux/uuid.h>
#include <linux/quotaops.h>
#include <linux/rcupdate_wait.h>
#include <linux/uaccess.h>
#include "internal.h"
#define BLOCKS_PER_PAGE …
#define VM_ACCT(size) …
#define BOGO_DIRENT_SIZE …
#define BOGO_INODE_SIZE …
#define SHORT_SYMLINK_LEN …
struct shmem_falloc { … };
struct shmem_options { … };
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static unsigned long huge_shmem_orders_always __read_mostly;
static unsigned long huge_shmem_orders_madvise __read_mostly;
static unsigned long huge_shmem_orders_inherit __read_mostly;
static unsigned long huge_shmem_orders_within_size __read_mostly;
#endif
#ifdef CONFIG_TMPFS
static unsigned long shmem_default_max_blocks(void)
{ … }
static unsigned long shmem_default_max_inodes(void)
{ … }
#endif
static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
struct folio **foliop, enum sgp_type sgp, gfp_t gfp,
struct vm_area_struct *vma, vm_fault_t *fault_type);
static inline struct shmem_sb_info *SHMEM_SB(struct super_block *sb)
{ … }
static inline int shmem_acct_size(unsigned long flags, loff_t size)
{ … }
static inline void shmem_unacct_size(unsigned long flags, loff_t size)
{ … }
static inline int shmem_reacct_size(unsigned long flags,
loff_t oldsize, loff_t newsize)
{ … }
static inline int shmem_acct_blocks(unsigned long flags, long pages)
{ … }
static inline void shmem_unacct_blocks(unsigned long flags, long pages)
{ … }
static int shmem_inode_acct_blocks(struct inode *inode, long pages)
{ … }
static void shmem_inode_unacct_blocks(struct inode *inode, long pages)
{ … }
static const struct super_operations shmem_ops;
static const struct address_space_operations shmem_aops;
static const struct file_operations shmem_file_operations;
static const struct inode_operations shmem_inode_operations;
static const struct inode_operations shmem_dir_inode_operations;
static const struct inode_operations shmem_special_inode_operations;
static const struct vm_operations_struct shmem_vm_ops;
static const struct vm_operations_struct shmem_anon_vm_ops;
static struct file_system_type shmem_fs_type;
bool shmem_mapping(struct address_space *mapping)
{ … }
EXPORT_SYMBOL_GPL(…);
bool vma_is_anon_shmem(struct vm_area_struct *vma)
{ … }
bool vma_is_shmem(struct vm_area_struct *vma)
{ … }
static LIST_HEAD(shmem_swaplist);
static DEFINE_MUTEX(shmem_swaplist_mutex);
#ifdef CONFIG_TMPFS_QUOTA
static int shmem_enable_quotas(struct super_block *sb,
unsigned short quota_types)
{ … }
static void shmem_disable_quotas(struct super_block *sb)
{ … }
static struct dquot __rcu **shmem_get_dquots(struct inode *inode)
{ … }
#endif
#define SHMEM_INO_BATCH …
static int shmem_reserve_inode(struct super_block *sb, ino_t *inop)
{ … }
static void shmem_free_inode(struct super_block *sb, size_t freed_ispace)
{ … }
static void shmem_recalc_inode(struct inode *inode, long alloced, long swapped)
{ … }
bool shmem_charge(struct inode *inode, long pages)
{ … }
void shmem_uncharge(struct inode *inode, long pages)
{ … }
static int shmem_replace_entry(struct address_space *mapping,
pgoff_t index, void *expected, void *replacement)
{ … }
static bool shmem_confirm_swap(struct address_space *mapping,
pgoff_t index, swp_entry_t swap)
{ … }
#define SHMEM_HUGE_NEVER …
#define SHMEM_HUGE_ALWAYS …
#define SHMEM_HUGE_WITHIN_SIZE …
#define SHMEM_HUGE_ADVISE …
#define SHMEM_HUGE_DENY …
#define SHMEM_HUGE_FORCE …
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static int shmem_huge __read_mostly = …;
static bool __shmem_huge_global_enabled(struct inode *inode, pgoff_t index,
loff_t write_end, bool shmem_huge_force,
struct vm_area_struct *vma,
unsigned long vm_flags)
{ … }
static bool shmem_huge_global_enabled(struct inode *inode, pgoff_t index,
loff_t write_end, bool shmem_huge_force,
struct vm_area_struct *vma, unsigned long vm_flags)
{ … }
#if defined(CONFIG_SYSFS)
static int shmem_parse_huge(const char *str)
{ … }
#endif
#if defined(CONFIG_SYSFS) || defined(CONFIG_TMPFS)
static const char *shmem_format_huge(int huge)
{ … }
#endif
static unsigned long shmem_unused_huge_shrink(struct shmem_sb_info *sbinfo,
struct shrink_control *sc, unsigned long nr_to_free)
{ … }
static long shmem_unused_huge_scan(struct super_block *sb,
struct shrink_control *sc)
{ … }
static long shmem_unused_huge_count(struct super_block *sb,
struct shrink_control *sc)
{ … }
#else
#define shmem_huge …
static unsigned long shmem_unused_huge_shrink(struct shmem_sb_info *sbinfo,
struct shrink_control *sc, unsigned long nr_to_free)
{
return 0;
}
static bool shmem_huge_global_enabled(struct inode *inode, pgoff_t index,
loff_t write_end, bool shmem_huge_force,
struct vm_area_struct *vma, unsigned long vm_flags)
{
return false;
}
#endif
static int shmem_add_to_page_cache(struct folio *folio,
struct address_space *mapping,
pgoff_t index, void *expected, gfp_t gfp)
{ … }
static void shmem_delete_from_page_cache(struct folio *folio, void *radswap)
{ … }
static long shmem_free_swap(struct address_space *mapping,
pgoff_t index, void *radswap)
{ … }
unsigned long shmem_partial_swap_usage(struct address_space *mapping,
pgoff_t start, pgoff_t end)
{ … }
unsigned long shmem_swap_usage(struct vm_area_struct *vma)
{ … }
void shmem_unlock_mapping(struct address_space *mapping)
{ … }
static struct folio *shmem_get_partial_folio(struct inode *inode, pgoff_t index)
{ … }
static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
bool unfalloc)
{ … }
void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
{ … }
EXPORT_SYMBOL_GPL(…);
static int shmem_getattr(struct mnt_idmap *idmap,
const struct path *path, struct kstat *stat,
u32 request_mask, unsigned int query_flags)
{ … }
static int shmem_setattr(struct mnt_idmap *idmap,
struct dentry *dentry, struct iattr *attr)
{ … }
static void shmem_evict_inode(struct inode *inode)
{ … }
static int shmem_find_swap_entries(struct address_space *mapping,
pgoff_t start, struct folio_batch *fbatch,
pgoff_t *indices, unsigned int type)
{ … }
static int shmem_unuse_swap_entries(struct inode *inode,
struct folio_batch *fbatch, pgoff_t *indices)
{ … }
static int shmem_unuse_inode(struct inode *inode, unsigned int type)
{ … }
int shmem_unuse(unsigned int type)
{ … }
static int shmem_writepage(struct page *page, struct writeback_control *wbc)
{ … }
#if defined(CONFIG_NUMA) && defined(CONFIG_TMPFS)
static void shmem_show_mpol(struct seq_file *seq, struct mempolicy *mpol)
{ … }
static struct mempolicy *shmem_get_sbmpol(struct shmem_sb_info *sbinfo)
{ … }
#else
static inline void shmem_show_mpol(struct seq_file *seq, struct mempolicy *mpol)
{
}
static inline struct mempolicy *shmem_get_sbmpol(struct shmem_sb_info *sbinfo)
{
return NULL;
}
#endif
static struct mempolicy *shmem_get_pgoff_policy(struct shmem_inode_info *info,
pgoff_t index, unsigned int order, pgoff_t *ilx);
static struct folio *shmem_swapin_cluster(swp_entry_t swap, gfp_t gfp,
struct shmem_inode_info *info, pgoff_t index)
{ … }
static gfp_t limit_gfp_mask(gfp_t huge_gfp, gfp_t limit_gfp)
{ … }
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
unsigned long shmem_allowable_huge_orders(struct inode *inode,
struct vm_area_struct *vma, pgoff_t index,
loff_t write_end, bool shmem_huge_force)
{ … }
static unsigned long shmem_suitable_orders(struct inode *inode, struct vm_fault *vmf,
struct address_space *mapping, pgoff_t index,
unsigned long orders)
{ … }
#else
static unsigned long shmem_suitable_orders(struct inode *inode, struct vm_fault *vmf,
struct address_space *mapping, pgoff_t index,
unsigned long orders)
{
return 0;
}
#endif
static struct folio *shmem_alloc_folio(gfp_t gfp, int order,
struct shmem_inode_info *info, pgoff_t index)
{ … }
static struct folio *shmem_alloc_and_add_folio(struct vm_fault *vmf,
gfp_t gfp, struct inode *inode, pgoff_t index,
struct mm_struct *fault_mm, unsigned long orders)
{ … }
static bool shmem_should_replace_folio(struct folio *folio, gfp_t gfp)
{ … }
static int shmem_replace_folio(struct folio **foliop, gfp_t gfp,
struct shmem_inode_info *info, pgoff_t index,
struct vm_area_struct *vma)
{ … }
static void shmem_set_folio_swapin_error(struct inode *inode, pgoff_t index,
struct folio *folio, swp_entry_t swap)
{ … }
static int shmem_split_large_entry(struct inode *inode, pgoff_t index,
swp_entry_t swap, gfp_t gfp)
{ … }
static int shmem_swapin_folio(struct inode *inode, pgoff_t index,
struct folio **foliop, enum sgp_type sgp,
gfp_t gfp, struct vm_area_struct *vma,
vm_fault_t *fault_type)
{ … }
static int shmem_get_folio_gfp(struct inode *inode, pgoff_t index,
loff_t write_end, struct folio **foliop, enum sgp_type sgp,
gfp_t gfp, struct vm_fault *vmf, vm_fault_t *fault_type)
{ … }
int shmem_get_folio(struct inode *inode, pgoff_t index, loff_t write_end,
struct folio **foliop, enum sgp_type sgp)
{ … }
EXPORT_SYMBOL_GPL(…);
static int synchronous_wake_function(wait_queue_entry_t *wait,
unsigned int mode, int sync, void *key)
{ … }
static vm_fault_t shmem_falloc_wait(struct vm_fault *vmf, struct inode *inode)
{ … }
static vm_fault_t shmem_fault(struct vm_fault *vmf)
{ … }
unsigned long shmem_get_unmapped_area(struct file *file,
unsigned long uaddr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{ … }
#ifdef CONFIG_NUMA
static int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *mpol)
{ … }
static struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
unsigned long addr, pgoff_t *ilx)
{ … }
static struct mempolicy *shmem_get_pgoff_policy(struct shmem_inode_info *info,
pgoff_t index, unsigned int order, pgoff_t *ilx)
{ … }
#else
static struct mempolicy *shmem_get_pgoff_policy(struct shmem_inode_info *info,
pgoff_t index, unsigned int order, pgoff_t *ilx)
{
*ilx = 0;
return NULL;
}
#endif
int shmem_lock(struct file *file, int lock, struct ucounts *ucounts)
{ … }
static int shmem_mmap(struct file *file, struct vm_area_struct *vma)
{ … }
static int shmem_file_open(struct inode *inode, struct file *file)
{ … }
#ifdef CONFIG_TMPFS_XATTR
static int shmem_initxattrs(struct inode *, const struct xattr *, void *);
static void shmem_set_inode_flags(struct inode *inode, unsigned int fsflags)
{ … }
#else
static void shmem_set_inode_flags(struct inode *inode, unsigned int fsflags)
{
}
#define shmem_initxattrs …
#endif
static struct offset_ctx *shmem_get_offset_ctx(struct inode *inode)
{ … }
static struct inode *__shmem_get_inode(struct mnt_idmap *idmap,
struct super_block *sb,
struct inode *dir, umode_t mode,
dev_t dev, unsigned long flags)
{ … }
#ifdef CONFIG_TMPFS_QUOTA
static struct inode *shmem_get_inode(struct mnt_idmap *idmap,
struct super_block *sb, struct inode *dir,
umode_t mode, dev_t dev, unsigned long flags)
{ … }
#else
static inline struct inode *shmem_get_inode(struct mnt_idmap *idmap,
struct super_block *sb, struct inode *dir,
umode_t mode, dev_t dev, unsigned long flags)
{
return __shmem_get_inode(idmap, sb, dir, mode, dev, flags);
}
#endif
#ifdef CONFIG_USERFAULTFD
int shmem_mfill_atomic_pte(pmd_t *dst_pmd,
struct vm_area_struct *dst_vma,
unsigned long dst_addr,
unsigned long src_addr,
uffd_flags_t flags,
struct folio **foliop)
{ … }
#endif
#ifdef CONFIG_TMPFS
static const struct inode_operations shmem_symlink_inode_operations;
static const struct inode_operations shmem_short_symlink_operations;
static int
shmem_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len,
struct folio **foliop, void **fsdata)
{ … }
static int
shmem_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct folio *folio, void *fsdata)
{ … }
static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
{ … }
static ssize_t shmem_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
{ … }
static bool zero_pipe_buf_get(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{ … }
static void zero_pipe_buf_release(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{ … }
static bool zero_pipe_buf_try_steal(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{ … }
static const struct pipe_buf_operations zero_pipe_buf_ops = …;
static size_t splice_zeropage_into_pipe(struct pipe_inode_info *pipe,
loff_t fpos, size_t size)
{ … }
static ssize_t shmem_file_splice_read(struct file *in, loff_t *ppos,
struct pipe_inode_info *pipe,
size_t len, unsigned int flags)
{ … }
static loff_t shmem_file_llseek(struct file *file, loff_t offset, int whence)
{ … }
static long shmem_fallocate(struct file *file, int mode, loff_t offset,
loff_t len)
{ … }
static int shmem_statfs(struct dentry *dentry, struct kstatfs *buf)
{ … }
static int
shmem_mknod(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, dev_t dev)
{ … }
static int
shmem_tmpfile(struct mnt_idmap *idmap, struct inode *dir,
struct file *file, umode_t mode)
{ … }
static int shmem_mkdir(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode)
{ … }
static int shmem_create(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, umode_t mode, bool excl)
{ … }
static int shmem_link(struct dentry *old_dentry, struct inode *dir,
struct dentry *dentry)
{ … }
static int shmem_unlink(struct inode *dir, struct dentry *dentry)
{ … }
static int shmem_rmdir(struct inode *dir, struct dentry *dentry)
{ … }
static int shmem_whiteout(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry)
{ … }
static int shmem_rename2(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
{ … }
static int shmem_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *symname)
{ … }
static void shmem_put_link(void *arg)
{ … }
static const char *shmem_get_link(struct dentry *dentry, struct inode *inode,
struct delayed_call *done)
{ … }
#ifdef CONFIG_TMPFS_XATTR
static int shmem_fileattr_get(struct dentry *dentry, struct fileattr *fa)
{ … }
static int shmem_fileattr_set(struct mnt_idmap *idmap,
struct dentry *dentry, struct fileattr *fa)
{ … }
static int shmem_initxattrs(struct inode *inode,
const struct xattr *xattr_array, void *fs_info)
{ … }
static int shmem_xattr_handler_get(const struct xattr_handler *handler,
struct dentry *unused, struct inode *inode,
const char *name, void *buffer, size_t size)
{ … }
static int shmem_xattr_handler_set(const struct xattr_handler *handler,
struct mnt_idmap *idmap,
struct dentry *unused, struct inode *inode,
const char *name, const void *value,
size_t size, int flags)
{ … }
static const struct xattr_handler shmem_security_xattr_handler = …;
static const struct xattr_handler shmem_trusted_xattr_handler = …;
static const struct xattr_handler shmem_user_xattr_handler = …;
static const struct xattr_handler * const shmem_xattr_handlers[] = …;
static ssize_t shmem_listxattr(struct dentry *dentry, char *buffer, size_t size)
{ … }
#endif
static const struct inode_operations shmem_short_symlink_operations = …;
static const struct inode_operations shmem_symlink_inode_operations = …;
static struct dentry *shmem_get_parent(struct dentry *child)
{ … }
static int shmem_match(struct inode *ino, void *vfh)
{ … }
static struct dentry *shmem_find_alias(struct inode *inode)
{ … }
static struct dentry *shmem_fh_to_dentry(struct super_block *sb,
struct fid *fid, int fh_len, int fh_type)
{ … }
static int shmem_encode_fh(struct inode *inode, __u32 *fh, int *len,
struct inode *parent)
{ … }
static const struct export_operations shmem_export_ops = …;
enum shmem_param { … };
static const struct constant_table shmem_param_enums_huge[] = …;
const struct fs_parameter_spec shmem_fs_parameters[] = …;
static int shmem_parse_one(struct fs_context *fc, struct fs_parameter *param)
{ … }
static int shmem_parse_options(struct fs_context *fc, void *data)
{ … }
static int shmem_reconfigure(struct fs_context *fc)
{ … }
static int shmem_show_options(struct seq_file *seq, struct dentry *root)
{ … }
#endif
static void shmem_put_super(struct super_block *sb)
{ … }
static int shmem_fill_super(struct super_block *sb, struct fs_context *fc)
{ … }
static int shmem_get_tree(struct fs_context *fc)
{ … }
static void shmem_free_fc(struct fs_context *fc)
{ … }
static const struct fs_context_operations shmem_fs_context_ops = …;
static struct kmem_cache *shmem_inode_cachep __ro_after_init;
static struct inode *shmem_alloc_inode(struct super_block *sb)
{ … }
static void shmem_free_in_core_inode(struct inode *inode)
{ … }
static void shmem_destroy_inode(struct inode *inode)
{ … }
static void shmem_init_inode(void *foo)
{ … }
static void __init shmem_init_inodecache(void)
{ … }
static void __init shmem_destroy_inodecache(void)
{ … }
static int shmem_error_remove_folio(struct address_space *mapping,
struct folio *folio)
{ … }
static const struct address_space_operations shmem_aops = …;
static const struct file_operations shmem_file_operations = …;
static const struct inode_operations shmem_inode_operations = …;
static const struct inode_operations shmem_dir_inode_operations = …;
static const struct inode_operations shmem_special_inode_operations = …;
static const struct super_operations shmem_ops = …;
static const struct vm_operations_struct shmem_vm_ops = …;
static const struct vm_operations_struct shmem_anon_vm_ops = …;
int shmem_init_fs_context(struct fs_context *fc)
{ … }
static struct file_system_type shmem_fs_type = …;
void __init shmem_init(void)
{ … }
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && defined(CONFIG_SYSFS)
static ssize_t shmem_enabled_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
static ssize_t shmem_enabled_store(struct kobject *kobj,
struct kobj_attribute *attr, const char *buf, size_t count)
{ … }
struct kobj_attribute shmem_enabled_attr = …;
static DEFINE_SPINLOCK(huge_shmem_orders_lock);
static ssize_t thpsize_shmem_enabled_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{ … }
static ssize_t thpsize_shmem_enabled_store(struct kobject *kobj,
struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
struct kobj_attribute thpsize_shmem_enabled_attr = …;
#endif
#else
static struct file_system_type shmem_fs_type = {
.name = "tmpfs",
.init_fs_context = ramfs_init_fs_context,
.parameters = ramfs_fs_parameters,
.kill_sb = ramfs_kill_sb,
.fs_flags = FS_USERNS_MOUNT,
};
void __init shmem_init(void)
{
BUG_ON(register_filesystem(&shmem_fs_type) != 0);
shm_mnt = kern_mount(&shmem_fs_type);
BUG_ON(IS_ERR(shm_mnt));
}
int shmem_unuse(unsigned int type)
{
return 0;
}
int shmem_lock(struct file *file, int lock, struct ucounts *ucounts)
{
return 0;
}
void shmem_unlock_mapping(struct address_space *mapping)
{
}
#ifdef CONFIG_MMU
unsigned long shmem_get_unmapped_area(struct file *file,
unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{
return mm_get_unmapped_area(current->mm, file, addr, len, pgoff, flags);
}
#endif
void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
{
truncate_inode_pages_range(inode->i_mapping, lstart, lend);
}
EXPORT_SYMBOL_GPL(shmem_truncate_range);
#define shmem_vm_ops …
#define shmem_anon_vm_ops …
#define shmem_file_operations …
#define shmem_acct_size …
#define shmem_unacct_size …
static inline struct inode *shmem_get_inode(struct mnt_idmap *idmap,
struct super_block *sb, struct inode *dir,
umode_t mode, dev_t dev, unsigned long flags)
{
struct inode *inode = ramfs_get_inode(sb, dir, mode, dev);
return inode ? inode : ERR_PTR(-ENOSPC);
}
#endif
static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name,
loff_t size, unsigned long flags, unsigned int i_flags)
{ … }
struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
struct file *shmem_file_setup_with_mnt(struct vfsmount *mnt, const char *name,
loff_t size, unsigned long flags)
{ … }
EXPORT_SYMBOL_GPL(…);
int shmem_zero_setup(struct vm_area_struct *vma)
{ … }
struct folio *shmem_read_folio_gfp(struct address_space *mapping,
pgoff_t index, gfp_t gfp)
{ … }
EXPORT_SYMBOL_GPL(…);
struct page *shmem_read_mapping_page_gfp(struct address_space *mapping,
pgoff_t index, gfp_t gfp)
{ … }
EXPORT_SYMBOL_GPL(…);