Files

43 lines
1.0 KiB
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
2005-04-16 15:20:36 -07:00
#include <linux/kernel.h>
#include <linux/blkdev.h>
2005-04-16 15:20:36 -07:00
#include <linux/init.h>
#include <linux/syscalls.h>
#include <linux/unistd.h>
#include <linux/slab.h>
#include <linux/mount.h>
#include <linux/major.h>
#include <linux/root_dev.h>
2020-07-21 11:12:08 +02:00
#include <linux/init_syscalls.h>
2024-02-06 16:18:43 +01:00
#include <linux/task_work.h>
#include <linux/file.h>
2005-04-16 15:20:36 -07:00
2023-05-31 14:55:19 +02:00
void mount_root_generic(char *name, char *pretty_name, int flags);
void mount_root(char *root_device_name);
2005-04-16 15:20:36 -07:00
extern int root_mountflags;
2020-07-21 12:20:16 +02:00
static inline __init int create_dev(char *name, dev_t dev)
2005-04-16 15:20:36 -07:00
{
2020-07-23 08:23:40 +02:00
init_unlink(name);
2020-07-22 11:41:20 +02:00
return init_mknod(name, S_IFBLK | 0600, new_encode_dev(dev));
2005-04-16 15:20:36 -07:00
}
#ifdef CONFIG_BLK_DEV_RAM
int __init rd_load_image(void);
2005-04-16 15:20:36 -07:00
#else
static inline int rd_load_image(void) { return 0; }
2005-04-16 15:20:36 -07:00
#endif
#ifdef CONFIG_BLK_DEV_INITRD
void __init initrd_load(void);
2005-04-16 15:20:36 -07:00
#else
static inline void initrd_load(void) { }
2005-04-16 15:20:36 -07:00
#endif
2024-02-06 16:18:43 +01:00
/* Ensure that async file closing finished to prevent spurious errors. */
static inline void init_flush_fput(void)
{
flush_delayed_fput();
task_work_run();
}