diff options
author | David Howells | 2007-07-31 09:37:24 +0200 |
---|---|---|
committer | Linus Torvalds | 2007-08-01 00:39:36 +0200 |
commit | 2e92a3baee64112fd210a930276bad165b0bd576 (patch) | |
tree | 00e9e59fe3fe4ce84d2fb00b134a02a9137acdc7 /fs/ramfs | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23 (diff) | |
download | kernel-qcow2-linux-2e92a3baee64112fd210a930276bad165b0bd576.tar.gz kernel-qcow2-linux-2e92a3baee64112fd210a930276bad165b0bd576.tar.xz kernel-qcow2-linux-2e92a3baee64112fd210a930276bad165b0bd576.zip |
NOMMU: Fix SYSV IPC SHM
Fix the SYSV IPC SHM to work with the changes applied by the new fault handler
patches when CONFIG_MMU=n.
Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ramfs')
-rw-r--r-- | fs/ramfs/file-nommu.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c index cad2b7ace630..237fe8b8e819 100644 --- a/fs/ramfs/file-nommu.c +++ b/fs/ramfs/file-nommu.c @@ -295,5 +295,10 @@ unsigned long ramfs_nommu_get_unmapped_area(struct file *file, */ int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) { - return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS; + if (!(vma->vm_flags & VM_SHARED)) + return -ENOSYS; + + file_accessed(file); + vma->vm_ops = &generic_file_vm_ops; + return 0; } |