aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Litke <agl@us.ibm.com>2007-08-22 17:01:51 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-22 22:52:46 -0400
commita89182c76e54134081cfec6409df06731c5cb98f (patch)
tree270616c2f6a1ce63a0bbd196a00e267b27e08250
parentd4c63b7c74507c424afcc9c80ba77a55bfb0d07e (diff)
Fix VM_FAULT flags conversion for hugetlb
It seems a simple mistake was made when converting follow_hugetlb_page() over to the VM_FAULT flags bitmasks (in "mm: fault feedback #2", commit 83c54070ee1a2d05c89793884bea1a03f2851ed4). By using the wrong bitmask, hugetlb_fault() failures are not being recognized. This results in an infinite loop whenever follow_hugetlb_page is involved in a failed fault. Signed-off-by: Adam Litke <agl@us.ibm.com> Acked-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/hugetlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index d7ca59d66c59..de4cf458d6e1 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -643,7 +643,7 @@ int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
643 spin_unlock(&mm->page_table_lock); 643 spin_unlock(&mm->page_table_lock);
644 ret = hugetlb_fault(mm, vma, vaddr, 0); 644 ret = hugetlb_fault(mm, vma, vaddr, 0);
645 spin_lock(&mm->page_table_lock); 645 spin_lock(&mm->page_table_lock);
646 if (!(ret & VM_FAULT_MAJOR)) 646 if (!(ret & VM_FAULT_ERROR))
647 continue; 647 continue;
648 648
649 remainder = 0; 649 remainder = 0;