Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110134
b: refs/heads/master
c: 4b19de6
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Oct 2, 2008
1 parent 431314c commit d240fbf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c1b7f680dd4f550fa6f91f148cc6fa2c4bd0737
refs/heads/master: 4b19de6d1cb07c8bcb6778e771f9cfd5bcfdfd3e
2 changes: 1 addition & 1 deletion trunk/fs/ramfs/file-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const struct inode_operations ramfs_file_inode_operations = {
* size 0 on the assumption that it's going to be used for an mmap of shared
* memory
*/
static int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize)
{
struct pagevec lru_pvec;
unsigned long npages, xpages, loop, limit;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/ramfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extern int ramfs_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data, struct vfsmount *mnt);

#ifndef CONFIG_MMU
extern int ramfs_nommu_expand_for_mapping(struct inode *inode, size_t newsize);
extern unsigned long ramfs_nommu_get_unmapped_area(struct file *file,
unsigned long addr,
unsigned long len,
Expand Down
6 changes: 6 additions & 0 deletions trunk/mm/tiny-shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d240fbf

Please sign in to comment.