From 2e92a3baee64112fd210a930276bad165b0bd576 Mon Sep 17 00:00:00 2001 From: David Howells Date: Tue, 31 Jul 2007 00:37:24 -0700 Subject: 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 Cc: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ramfs/file-nommu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'fs/ramfs') 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; } -- cgit v1.2.3