diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-07-19 01:49:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 10:04:50 -0700 |
commit | 3abf7afd406866a84276d3ed04f4edf6070c9cb5 (patch) | |
tree | 4ee66f7d1a12261cbc7139b99b4fa94a8ecab122 /mm | |
parent | dd00cc486ab1c17049a535413d1751ef3482141c (diff) | |
download | linux-3.10-3abf7afd406866a84276d3ed04f4edf6070c9cb5.tar.gz linux-3.10-3abf7afd406866a84276d3ed04f4edf6070c9cb5.tar.bz2 linux-3.10-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.c | 17 |
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, 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; } |