aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-19 04:49:08 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 13:04:50 -0400
commit3abf7afd406866a84276d3ed04f4edf6070c9cb5 (patch)
tree4ee66f7d1a12261cbc7139b99b4fa94a8ecab122 /mm/hugetlb.c
parentdd00cc486ab1c17049a535413d1751ef3482141c (diff)
dequeue_huge_page() warning fix
mm/hugetlb.c: In function `dequeue_huge_page': mm/hugetlb.c:72: warning: 'nid' might be used uninitialized in this function Cc: Christoph Lameter <clameter@sgi.com> Cc: Adam Litke <agl@us.ibm.com> Cc: David Gibson <hermes@gibson.dropbear.id.au> Cc: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index c4a573b857b..15fc7b00077 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -78,16 +78,13 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
78 for (z = zonelist->zones; *z; z++) { 78 for (z = zonelist->zones; *z; z++) {
79 nid = zone_to_nid(*z); 79 nid = zone_to_nid(*z);
80 if (cpuset_zone_allowed_softwall(*z, htlb_alloc_mask) && 80 if (cpuset_zone_allowed_softwall(*z, htlb_alloc_mask) &&
81 !list_empty(&hugepage_freelists[nid])) 81 !list_empty(&hugepage_freelists[nid])) {
82 break; 82 page = list_entry(hugepage_freelists[nid].next,
83 } 83 struct page, lru);
84 84 list_del(&page->lru);
85 if (*z) { 85 free_huge_pages--;
86 page = list_entry(hugepage_freelists[nid].next, 86 free_huge_pages_node[nid]--;
87 struct page, lru); 87 }
88 list_del(&page->lru);
89 free_huge_pages--;
90 free_huge_pages_node[nid]--;
91 } 88 }
92 return page; 89 return page;
93} 90}