aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index e43dc555069d..526149846d0a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2615,13 +2615,15 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
2615 * tmpfs instance, limiting inodes to one per page of lowmem; 2615 * tmpfs instance, limiting inodes to one per page of lowmem;
2616 * but the internal instance is left unlimited. 2616 * but the internal instance is left unlimited.
2617 */ 2617 */
2618 if (!(sb->s_flags & MS_NOUSER)) { 2618 if (!(sb->s_flags & MS_KERNMOUNT)) {
2619 sbinfo->max_blocks = shmem_default_max_blocks(); 2619 sbinfo->max_blocks = shmem_default_max_blocks();
2620 sbinfo->max_inodes = shmem_default_max_inodes(); 2620 sbinfo->max_inodes = shmem_default_max_inodes();
2621 if (shmem_parse_options(data, sbinfo, false)) { 2621 if (shmem_parse_options(data, sbinfo, false)) {
2622 err = -EINVAL; 2622 err = -EINVAL;
2623 goto failed; 2623 goto failed;
2624 } 2624 }
2625 } else {
2626 sb->s_flags |= MS_NOUSER;
2625 } 2627 }
2626 sb->s_export_op = &shmem_export_ops; 2628 sb->s_export_op = &shmem_export_ops;
2627 sb->s_flags |= MS_NOSEC; 2629 sb->s_flags |= MS_NOSEC;
@@ -2831,8 +2833,7 @@ int __init shmem_init(void)
2831 goto out2; 2833 goto out2;
2832 } 2834 }
2833 2835
2834 shm_mnt = vfs_kern_mount(&shmem_fs_type, MS_NOUSER, 2836 shm_mnt = kern_mount(&shmem_fs_type);
2835 shmem_fs_type.name, NULL);
2836 if (IS_ERR(shm_mnt)) { 2837 if (IS_ERR(shm_mnt)) {
2837 error = PTR_ERR(shm_mnt); 2838 error = PTR_ERR(shm_mnt);
2838 printk(KERN_ERR "Could not kern_mount tmpfs\n"); 2839 printk(KERN_ERR "Could not kern_mount tmpfs\n");