* [PATCH 22/21] mm: fix unmap_vmas with inner ptlock
@ 2005-10-14 22:59 Hugh Dickins
0 siblings, 0 replies; only message in thread
From: Hugh Dickins @ 2005-10-14 22:59 UTC (permalink / raw)
To: Andrew Morton
Cc: Adam Litke, David Gibson, William Irwin, Ken Chen, linux-kernel
He who lectures others about hugetlbfs truncation might discover that
it's got screwed by his very own self. I replaced zap_hugepage_range by
unmap_hugepage_range, overlooking that zap used "len" but unmap "end".
Signed-off-by: Hugh Dickins <hugh@veritas.com>
---
fs/hugetlbfs/inode.c | 6 +-----
1 files changed, 1 insertion(+), 5 deletions(-)
--- mm21/fs/hugetlbfs/inode.c 2005-10-11 23:57:59.000000000 +0100
+++ mm22/fs/hugetlbfs/inode.c 2005-10-14 23:28:42.000000000 +0100
@@ -284,7 +284,6 @@ hugetlb_vmtruncate_list(struct prio_tree
vma_prio_tree_foreach(vma, &iter, root, h_pgoff, ULONG_MAX) {
unsigned long h_vm_pgoff;
- unsigned long v_length;
unsigned long v_offset;
h_vm_pgoff = vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT);
@@ -295,11 +294,8 @@ hugetlb_vmtruncate_list(struct prio_tree
if (h_vm_pgoff >= h_pgoff)
v_offset = 0;
- v_length = vma->vm_end - vma->vm_start;
-
unmap_hugepage_range(vma,
- vma->vm_start + v_offset,
- v_length - v_offset);
+ vma->vm_start + v_offset, vma->vm_end);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-10-14 23:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-14 22:59 [PATCH 22/21] mm: fix unmap_vmas with inner ptlock Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®