summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-07-19 10:49:08 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-19 19:04:50 +0200
commit3abf7afd406866a84276d3ed04f4edf6070c9cb5 (patch)
tree4ee66f7d1a12261cbc7139b99b4fa94a8ecab122 /mm
parentsome kmalloc/memset ->kzalloc (tree wide) (diff)
downloadlinux-3abf7afd406866a84276d3ed04f4edf6070c9cb5.tar.xz
linux-3abf7afd406866a84276d3ed04f4edf6070c9cb5.zip
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')
-rw-r--r--mm/hugetlb.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index c4a573b857bd..15fc7b000772 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -78,16 +78,13 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma,
for (z = zonelist->zones; *z; z++) {
nid = zone_to_nid(*z);
if (cpuset_zone_allowed_softwall(*z, htlb_alloc_mask) &&
- !list_empty(&hugepage_freelists[nid]))
- break;
- }
-
- if (*z) {
- page = list_entry(hugepage_freelists[nid].next,
- struct page, lru);
- list_del(&page->lru);
- free_huge_pages--;
- free_huge_pages_node[nid]--;
+ !list_empty(&hugepage_freelists[nid])) {
+ page = list_entry(hugepage_freelists[nid].next,
+ struct page, lru);
+ list_del(&page->lru);
+ free_huge_pages--;
+ free_huge_pages_node[nid]--;
+ }
}
return page;
}