]> git.baikalelectronics.ru Git - kernel.git/commit
mm: fault feedback #1
authorNick Piggin <npiggin@suse.de>
Thu, 19 Jul 2007 08:47:03 +0000 (01:47 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 19 Jul 2007 17:04:41 +0000 (10:04 -0700)
commitd084c7e62070dd6a14f051d43cacb07abdb78754
treed3309094bb734d34773f97d642593e298a5cfcfc
parentc4825ab8d3d6c8c8225aff263cfcf3e9f35a882e
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>
16 files changed:
Documentation/feature-removal-schedule.txt
Documentation/filesystems/Locking
fs/gfs2/ops_file.c
fs/gfs2/ops_vm.c
fs/ncpfs/mmap.c
fs/ocfs2/mmap.c
fs/xfs/linux-2.6/xfs_file.c
include/linux/mm.h
ipc/shm.c
mm/filemap.c
mm/filemap_xip.c
mm/fremap.c
mm/hugetlb.c
mm/memory.c
mm/nommu.c
mm/shmem.c