diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-12 01:30:33 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-10-12 01:30:33 -0300 |
commit | e914f8eb445e8f74b00303c19c2ffceaedd16a05 (patch) | |
tree | 86b60bdecb3cf6abe8546f30803b673892a40335 /kernel/power/snapshot.c | |
parent | 1c29f4306f557ef5d9ed515ec8881f4d1735b058 (diff) |
Linux-libre 4.7.6-gnupck-4.7.6-gnu
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 542163a01..dc3bab15e 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -812,9 +812,9 @@ static bool memory_bm_pfn_present(struct memory_bitmap *bm, int index, unsigned */ static bool rtree_next_node(struct memory_bitmap *bm, int index) { - bm->cur[index].node = list_entry(bm->cur[index].node->list.next, - struct rtree_node, list); - if (&bm->cur[index].node->list != &bm->cur[index].zone->leaves) { + if (!list_is_last(&bm->cur[index].node->list, &bm->cur[index].zone->leaves)) { + bm->cur[index].node = list_entry(bm->cur[index].node->list.next, + struct rtree_node, list); bm->cur[index].node_pfn += BM_BITS_PER_BLOCK; bm->cur[index].node_bit = 0; touch_softlockup_watchdog(); @@ -822,9 +822,9 @@ static bool rtree_next_node(struct memory_bitmap *bm, int index) } /* No more nodes, goto next zone */ - bm->cur[index].zone = list_entry(bm->cur[index].zone->list.next, + if (!list_is_last(&bm->cur[index].zone->list, &bm->zones)) { + bm->cur[index].zone = list_entry(bm->cur[index].zone->list.next, struct mem_zone_bm_rtree, list); - if (&bm->cur[index].zone->list != &bm->zones) { bm->cur[index].node = list_entry(bm->cur[index].zone->leaves.next, struct rtree_node, list); bm->cur[index].node_pfn = 0; |