aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/hugetlbfs/inode.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 3a9b6d179cbd..a826a8add5e3 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -92,7 +92,7 @@ out:
92} 92}
93 93
94/* 94/*
95 * Called under down_write(mmap_sem), page_table_lock is not held 95 * Called under down_write(mmap_sem).
96 */ 96 */
97 97
98#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA 98#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
@@ -308,7 +308,6 @@ hugetlb_vmtruncate_list(struct prio_tree_root *root, unsigned long h_pgoff)
308 308
309 vma_prio_tree_foreach(vma, &iter, root, h_pgoff, ULONG_MAX) { 309 vma_prio_tree_foreach(vma, &iter, root, h_pgoff, ULONG_MAX) {
310 unsigned long h_vm_pgoff; 310 unsigned long h_vm_pgoff;
311 unsigned long v_length;
312 unsigned long v_offset; 311 unsigned long v_offset;
313 312
314 h_vm_pgoff = vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT); 313 h_vm_pgoff = vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT);
@@ -319,11 +318,8 @@ hugetlb_vmtruncate_list(struct prio_tree_root *root, unsigned long h_pgoff)
319 if (h_vm_pgoff >= h_pgoff) 318 if (h_vm_pgoff >= h_pgoff)
320 v_offset = 0; 319 v_offset = 0;
321 320
322 v_length = vma->vm_end - vma->vm_start; 321 unmap_hugepage_range(vma,
323 322 vma->vm_start + v_offset, vma->vm_end);
324 zap_hugepage_range(vma,
325 vma->vm_start + v_offset,
326 v_length - v_offset);
327 } 323 }
328} 324}
329 325