mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Cc: Adam Litke <[email protected]> Cc: David Gibson <[email protected]> Cc: William Lee Irwin III <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dd00cc486a
commit
3abf7afd40
1 changed files with 7 additions and 10 deletions
17
mm/hugetlb.c
17
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue