X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=mm%2Ftiny-shmem.c;h=3e67d575ee6e64821c43ea2b7d181a3d36d9805d;hb=296e1ce0dc36bb106c139e25482d02da43c70e71;hp=d17cb6f6ab1029cdad5ef6a67523be159ff12211;hpb=75f500204c645787c27d6085d39291946c928e02;p=linux-2.6-omap-h63xx.git diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index d17cb6f6ab1..3e67d575ee6 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: @@ -89,6 +95,7 @@ put_dentry: put_memory: return ERR_PTR(error); } +EXPORT_SYMBOL_GPL(shmem_file_setup); /** * shmem_zero_setup - setup a shared anonymous mapping