diff options
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 5b2dbb3ba4f..4a0d1f06da5 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -3,7 +3,7 @@ * Library for filesystems writers. */ -#include <linux/module.h> +#include <linux/export.h> #include <linux/pagemap.h> #include <linux/slab.h> #include <linux/mount.h> @@ -491,11 +491,9 @@ int simple_fill_super(struct super_block *s, unsigned long magic, inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations; set_nlink(inode, 2); - root = d_alloc_root(inode); - if (!root) { - iput(inode); + root = d_make_root(inode); + if (!root) return -ENOMEM; - } for (i = 0; !files->name || files->name[0]; i++, files++) { if (!files->name) continue; @@ -536,7 +534,7 @@ int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *c spin_lock(&pin_fs_lock); if (unlikely(!*mount)) { spin_unlock(&pin_fs_lock); - mnt = vfs_kern_mount(type, 0, type->name, NULL); + mnt = vfs_kern_mount(type, MS_KERNMOUNT, type->name, NULL); if (IS_ERR(mnt)) return PTR_ERR(mnt); spin_lock(&pin_fs_lock); |