aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-07-19 04:47:03 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:41 -0400
commitd0217ac04ca6591841e5665f518e38064f4e65bd (patch)
treed3309094bb734d34773f97d642593e298a5cfcfc /ipc/shm.c
parented2f2f9b3ff8debdf512f7687b232c3c1d7d60d7 (diff)
mm: fault feedback #1
Change ->fault prototype. We now return an int, which contains VM_FAULT_xxx code in the low byte, and FAULT_RET_xxx code in the next byte. FAULT_RET_ code tells the VM whether a page was found, whether it has been locked, and potentially other things. This is not quite the way he wanted it yet, but that's changed in the next patch (which requires changes to arch code). This means we no longer set VM_CAN_INVALIDATE in the vma in order to say that a page is locked which requires filemap_nopage to go away (because we can no longer remain backward compatible without that flag), but we were going to do that anyway. struct fault_data is renamed to struct vm_fault as Linus asked. address is now a void __user * that we should firmly encourage drivers not to use without really good reason. The page is now returned via a page pointer in the vm_fault struct. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index e2d090348b1e..d0259e3ad1c0 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -224,13 +224,12 @@ static void shm_close(struct vm_area_struct *vma)
224 mutex_unlock(&shm_ids(ns).mutex); 224 mutex_unlock(&shm_ids(ns).mutex);
225} 225}
226 226
227static struct page *shm_fault(struct vm_area_struct *vma, 227static int shm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
228 struct fault_data *fdata)
229{ 228{
230 struct file *file = vma->vm_file; 229 struct file *file = vma->vm_file;
231 struct shm_file_data *sfd = shm_file_data(file); 230 struct shm_file_data *sfd = shm_file_data(file);
232 231
233 return sfd->vm_ops->fault(vma, fdata); 232 return sfd->vm_ops->fault(vma, vmf);
234} 233}
235 234
236#ifdef CONFIG_NUMA 235#ifdef CONFIG_NUMA