29 #include <linux/time.h>
31 #include <linux/string.h>
34 #include <linux/sched.h>
36 #include <linux/magic.h>
37 #include <linux/slab.h>
38 #include <asm/uaccess.h>
41 #define RAMFS_DEFAULT_MODE 0755
63 inode->
i_mapping->backing_dev_info = &ramfs_backing_dev_info;
65 mapping_set_unevictable(inode->
i_mapping);
76 inode->
i_op = &ramfs_dir_inode_operations;
109 static int ramfs_mkdir(
struct inode * dir,
struct dentry * dentry,
umode_t mode)
117 static int ramfs_create(
struct inode *dir,
struct dentry *dentry,
umode_t mode,
bool excl)
119 return ramfs_mknod(dir, dentry, mode |
S_IFREG, 0);
122 static int ramfs_symlink(
struct inode * dir,
struct dentry *dentry,
const char * symname)
142 .create = ramfs_create,
146 .symlink = ramfs_symlink,
147 .mkdir = ramfs_mkdir,
149 .mknod = ramfs_mknod,
222 err = ramfs_parse_options(data, &fsi->
mount_opts);
230 sb->
s_op = &ramfs_ops;
242 int flags,
const char *dev_name,
void *data)
248 int flags,
const char *dev_name,
void *data)
262 .kill_sb = ramfs_kill_sb,
266 .mount = rootfs_mount,
270 static int __init init_ramfs_fs(
void)
280 err =
bdi_init(&ramfs_backing_dev_info);