aboutsummaryrefslogtreecommitdiffstats
path: root/fs/libfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/libfs.c')
-rw-r--r--fs/libfs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index 001e25be4b65..4a0d1f06da57 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -491,11 +491,9 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
491 inode->i_op = &simple_dir_inode_operations; 491 inode->i_op = &simple_dir_inode_operations;
492 inode->i_fop = &simple_dir_operations; 492 inode->i_fop = &simple_dir_operations;
493 set_nlink(inode, 2); 493 set_nlink(inode, 2);
494 root = d_alloc_root(inode); 494 root = d_make_root(inode);
495 if (!root) { 495 if (!root)
496 iput(inode);
497 return -ENOMEM; 496 return -ENOMEM;
498 }
499 for (i = 0; !files->name || files->name[0]; i++, files++) { 497 for (i = 0; !files->name || files->name[0]; i++, files++) {
500 if (!files->name) 498 if (!files->name)
501 continue; 499 continue;
@@ -536,7 +534,7 @@ int simple_pin_fs(struct file_system_type *type, struct vfsmount **mount, int *c
536 spin_lock(&pin_fs_lock); 534 spin_lock(&pin_fs_lock);
537 if (unlikely(!*mount)) { 535 if (unlikely(!*mount)) {
538 spin_unlock(&pin_fs_lock); 536 spin_unlock(&pin_fs_lock);
539 mnt = vfs_kern_mount(type, 0, type->name, NULL); 537 mnt = vfs_kern_mount(type, MS_KERNMOUNT, type->name, NULL);
540 if (IS_ERR(mnt)) 538 if (IS_ERR(mnt))
541 return PTR_ERR(mnt); 539 return PTR_ERR(mnt);
542 spin_lock(&pin_fs_lock); 540 spin_lock(&pin_fs_lock);