aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/snapshot.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-09-01 12:33:46 -0400
committerThomas Gleixner <tglx@linutronix.de>2016-09-01 12:33:46 -0400
commit0cb7bf61b1e9f05027de58c80f9b46a714d24e35 (patch)
tree41fb55cf62d07b425122f9a8b96412c0d8eb99c5 /kernel/power/snapshot.c
parentaa877175e7a9982233ed8f10cb4bfddd78d82741 (diff)
parent3eab887a55424fc2c27553b7bfe32330df83f7b8 (diff)
Merge branch 'linus' into smp/hotplug
Apply upstream changes to avoid conflicts with pending patches.
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r--kernel/power/snapshot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 9a0178c2ac1d..b02228411d57 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -835,9 +835,9 @@ static bool memory_bm_pfn_present(struct memory_bitmap *bm, unsigned long pfn)
835 */ 835 */
836static bool rtree_next_node(struct memory_bitmap *bm) 836static bool rtree_next_node(struct memory_bitmap *bm)
837{ 837{
838 bm->cur.node = list_entry(bm->cur.node->list.next, 838 if (!list_is_last(&bm->cur.node->list, &bm->cur.zone->leaves)) {
839 struct rtree_node, list); 839 bm->cur.node = list_entry(bm->cur.node->list.next,
840 if (&bm->cur.node->list != &bm->cur.zone->leaves) { 840 struct rtree_node, list);
841 bm->cur.node_pfn += BM_BITS_PER_BLOCK; 841 bm->cur.node_pfn += BM_BITS_PER_BLOCK;
842 bm->cur.node_bit = 0; 842 bm->cur.node_bit = 0;
843 touch_softlockup_watchdog(); 843 touch_softlockup_watchdog();
@@ -845,9 +845,9 @@ static bool rtree_next_node(struct memory_bitmap *bm)
845 } 845 }
846 846
847 /* No more nodes, goto next zone */ 847 /* No more nodes, goto next zone */
848 bm->cur.zone = list_entry(bm->cur.zone->list.next, 848 if (!list_is_last(&bm->cur.zone->list, &bm->zones)) {
849 bm->cur.zone = list_entry(bm->cur.zone->list.next,
849 struct mem_zone_bm_rtree, list); 850 struct mem_zone_bm_rtree, list);
850 if (&bm->cur.zone->list != &bm->zones) {
851 bm->cur.node = list_entry(bm->cur.zone->leaves.next, 851 bm->cur.node = list_entry(bm->cur.zone->leaves.next,
852 struct rtree_node, list); 852 struct rtree_node, list);
853 bm->cur.node_pfn = 0; 853 bm->cur.node_pfn = 0;