aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro2013-08-31 12:57:10 -0400
committerAl Viro2013-09-03 22:50:27 -0400
commitca4e05195dbc25bb0f1d4c70a39e6396115807c9 (patch)
treea5ee964c424eff43e63a746d1ae65b955bde5705
parent52e220d357a38cb29fa2e29f34ed94c1d66357f4 (diff)
shm_mnt is as longterm as it gets, TYVM...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-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)
* tmpfs instance, limiting inodes to one per page of lowmem;
* but the internal instance is left unlimited.
*/
- if (!(sb->s_flags & MS_NOUSER)) {
+ if (!(sb->s_flags & MS_KERNMOUNT)) {
sbinfo->max_blocks = shmem_default_max_blocks();
sbinfo->max_inodes = shmem_default_max_inodes();
if (shmem_parse_options(data, sbinfo, false)) {
err = -EINVAL;
goto failed;
}
+ } else {
+ sb->s_flags |= MS_NOUSER;
}
sb->s_export_op = &shmem_export_ops;
sb->s_flags |= MS_NOSEC;
@@ -2831,8 +2833,7 @@ int __init shmem_init(void)
goto out2;
}
- shm_mnt = vfs_kern_mount(&shmem_fs_type, MS_NOUSER,
- shmem_fs_type.name, NULL);
+ shm_mnt = kern_mount(&shmem_fs_type);
if (IS_ERR(shm_mnt)) {
error = PTR_ERR(shm_mnt);
printk(KERN_ERR "Could not kern_mount tmpfs\n");