#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/syscalls.h>
#include <linux/mount.h>
#include <linux/device.h>
#include <linux/blkdev.h>
#include <linux/namei.h>
#include <linux/fs.h>
#include <linux/shmem_fs.h>
#include <linux/ramfs.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/kthread.h>
#include <linux/init_syscalls.h>
#include <uapi/linux/mount.h>
#include "base.h"
#ifdef CONFIG_DEVTMPFS_SAFE
#define DEVTMPFS_MFLAGS …
#else
#define DEVTMPFS_MFLAGS …
#endif
static struct task_struct *thread;
static int __initdata mount_dev = … IS_ENABLED(…);
static DEFINE_SPINLOCK(req_lock);
static struct req { … } *requests;
static int __init mount_param(char *str)
{ … }
__setup(…);
static struct vfsmount *mnt;
static struct dentry *public_dev_mount(struct file_system_type *fs_type, int flags,
const char *dev_name, void *data)
{ … }
static struct file_system_type internal_fs_type = …;
static struct file_system_type dev_fs_type = …;
static int devtmpfs_submit_req(struct req *req, const char *tmp)
{ … }
int devtmpfs_create_node(struct device *dev)
{ … }
int devtmpfs_delete_node(struct device *dev)
{ … }
static int dev_mkdir(const char *name, umode_t mode)
{ … }
static int create_path(const char *nodepath)
{ … }
static int handle_create(const char *nodename, umode_t mode, kuid_t uid,
kgid_t gid, struct device *dev)
{ … }
static int dev_rmdir(const char *name)
{ … }
static int delete_path(const char *nodepath)
{ … }
static int dev_mynode(struct device *dev, struct inode *inode, struct kstat *stat)
{ … }
static int handle_remove(const char *nodename, struct device *dev)
{ … }
int __init devtmpfs_mount(void)
{ … }
static __initdata DECLARE_COMPLETION(setup_done);
static int handle(const char *name, umode_t mode, kuid_t uid, kgid_t gid,
struct device *dev)
{ … }
static void __noreturn devtmpfs_work_loop(void)
{ … }
static noinline int __init devtmpfs_setup(void *p)
{ … }
static int __ref devtmpfsd(void *p)
{ … }
int __init devtmpfs_init(void)
{ … }