From: Nick Piggin Date: Fri, 23 May 2008 20:04:18 +0000 (-0700) Subject: mm: allow pfnmap ->fault()s X-Git-Tag: v3.12-rc1~20582 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42172d751b4596b8ca4346a1c251b5f1c661ab0c;p=kernel%2Fkernel-generic.git mm: allow pfnmap ->fault()s Take out an assertion to allow ->fault handlers to service PFNMAP regions. This is required to reimplement .nopfn handlers with .fault handlers and subsequently remove nopfn. Signed-off-by: Nick Piggin Acked-by: Jes Sorensen Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index fb5608a..19e0ae9 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2295,8 +2295,6 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma, vmf.flags = flags; vmf.page = NULL; - BUG_ON(vma->vm_flags & VM_PFNMAP); - ret = vma->vm_ops->fault(vma, &vmf); if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE))) return ret;