diff options
author | David Howells <dhowells@redhat.com> | 2010-01-15 20:01:32 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-16 15:15:39 -0500 |
commit | ed5e5894b234ce4793d78078c026915b853e0678 (patch) | |
tree | 199db2a5cc821d4de9645418fb00c03d438eae1f /ipc | |
parent | 8ff410daa009c4b44be445ded5b0cec00abc0426 (diff) |
nommu: fix SYSV SHM for NOMMU
Commit c4caa778157dbbf04116f0ac2111e389b5cd7a29 ("file
->get_unmapped_area() shouldn't duplicate work of get_unmapped_area()")
broke SYSV SHM for NOMMU by taking away the pointer to
shm_get_unmapped_area() from shm_file_operations.
Put it back conditionally on CONFIG_MMU=n.
file->f_ops->get_unmapped_area() is used to find out the base address for a
mapping of a mappable chardev device or mappable memory-based file (such as a
ramfs file). It needs to be called prior to file->f_ops->mmap() being called.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -298,6 +298,9 @@ static const struct file_operations shm_file_operations = { | |||
298 | .mmap = shm_mmap, | 298 | .mmap = shm_mmap, |
299 | .fsync = shm_fsync, | 299 | .fsync = shm_fsync, |
300 | .release = shm_release, | 300 | .release = shm_release, |
301 | #ifndef CONFIG_MMU | ||
302 | .get_unmapped_area = shm_get_unmapped_area, | ||
303 | #endif | ||
301 | }; | 304 | }; |
302 | 305 | ||
303 | static const struct file_operations shm_file_operations_huge = { | 306 | static const struct file_operations shm_file_operations_huge = { |