diff options
Diffstat (limited to 'mm/tiny-shmem.c')
-rw-r--r-- | mm/tiny-shmem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index d17cb6f6ab1..8d7a27a6335 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c @@ -80,6 +80,12 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) inode->i_nlink = 0; /* It is unlinked */ init_file(file, shm_mnt, dentry, FMODE_WRITE | FMODE_READ, &ramfs_file_operations); + +#ifndef CONFIG_MMU + error = ramfs_nommu_expand_for_mapping(inode, size); + if (error) + goto close_file; +#endif return file; close_file: |