]> git.baikalelectronics.ru Git - kernel.git/commit
nommu: fix SYSV SHM for NOMMU
authorDavid Howells <dhowells@redhat.com>
Sat, 16 Jan 2010 01:01:32 +0000 (17:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Jan 2010 20:15:39 +0000 (12:15 -0800)
commitd3ba3bbc1f75e68af67c35bf233c0e481add7be4
tree199db2a5cc821d4de9645418fb00c03d438eae1f
parenta072047616d1d3aac94883cb7ac9cd8c6c0c4fc5
nommu: fix SYSV SHM for NOMMU

Commit 8f474c8992a2c206afb5f10b1d371750a6ed15d8 ("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>
ipc/shm.c