mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2/7] hugetlb: fix zap_hugetlb_resources()
@ 2002-11-06  2:29 William Lee Irwin III
  0 siblings, 0 replies; only message in thread
From: William Lee Irwin III @ 2002-11-06  2:29 UTC (permalink / raw)
  To: linux-kernel

This patch eliminates zap_hugetlb_resources, along with its usages.
This actually fixes bugs, as zap_hugetlb_resources was itself buggy.

 hugetlbpage.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)


diff -urpN numaq-2.5.46/arch/i386/mm/hugetlbpage.c hugetlbfs-2.5.46/arch/i386/mm/hugetlbpage.c
--- numaq-2.5.46/arch/i386/mm/hugetlbpage.c	2002-11-04 14:30:50.000000000 -0800
+++ hugetlbfs-2.5.46/arch/i386/mm/hugetlbpage.c	2002-11-05 11:00:42.000000000 -0800
@@ -23,8 +23,6 @@ struct list_head htlbpage_freelist;
 spinlock_t htlbpage_lock = SPIN_LOCK_UNLOCKED;
 extern long htlbpagemem;
 
-void zap_hugetlb_resources(struct vm_area_struct *);
-
 #define MAX_ID 	32
 struct htlbpagekey {
 	struct inode *in;
@@ -143,7 +141,7 @@ int make_hugetlb_pages_present(unsigned 
 out_error:		/* Error case, remove the partial lp_resources. */
 	if (addr > vma->vm_start) {
 		vma->vm_end = addr;
-		zap_hugetlb_resources(vma);
+		zap_hugepage_range(vma, vma->vm_start, vma->vm_end - vma->vm_start);
 		vma->vm_end = end;
 	}
 	spin_unlock(&mm->page_table_lock);
@@ -263,11 +261,6 @@ void zap_hugepage_range(struct vm_area_s
 	spin_unlock(&mm->page_table_lock);
 }
 
-void zap_hugetlb_resources(struct vm_area_struct *vma)
-{
-	zap_hugepage_range(vma, vma->vm_start, vma->vm_end);
-}
-
 static void unlink_vma(struct vm_area_struct *mpnt)
 {
 	struct mm_struct *mm = current->mm;
@@ -397,7 +390,7 @@ out:
 		unsigned long raddr;
 		raddr = vma->vm_end;
 		vma->vm_end = addr;
-		zap_hugetlb_resources(vma);
+		zap_hugepage_range(vma, vma->vm_start, vma->vm_end - vma->vm_start);
 		vma->vm_end = raddr;
 	}
 	spin_unlock(&mm->page_table_lock);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-11-06  2:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06  2:29 [2/7] hugetlb: fix zap_hugetlb_resources() William Lee Irwin III

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®