Skip to content

Commit 13ee8e1

Browse files
author
Mel Gorman
committed
---
yaml --- r: 345883 b: refs/heads/rpi-3.9.y c: 149c33e h: refs/heads/rpi-3.6.y i: 345881: ff7d632 345879: da4a5cd v: v3
1 parent a1f9a5e commit 13ee8e1

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎[refs]‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
refs/heads/rpi-3.6.y: 10bc58289a7ebf6b1ab724636e0a16116278e339
33
refs/heads/master: 645fd9b0c0b3c1f79f71f92dac79bd2f87010444
4-
refs/heads/rpi-3.9.y: 7039e1dbec6eeaa8ecab43a82d6589eeced995c3
4+
refs/heads/rpi-3.9.y: 149c33e1c98f83050870514f380902dc6d617bd5

‎branches/rpi-3.9.y/mm/migrate.c‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,18 +1489,21 @@ int migrate_misplaced_page(struct page *page, int node)
14891489
}
14901490
isolated = 1;
14911491

1492-
/*
1493-
* Page is isolated which takes a reference count so now the
1494-
* callers reference can be safely dropped without the page
1495-
* disappearing underneath us during migration
1496-
*/
1497-
put_page(page);
1498-
14991492
page_lru = page_is_file_cache(page);
15001493
inc_zone_page_state(page, NR_ISOLATED_ANON + page_lru);
15011494
list_add(&page->lru, &migratepages);
15021495
}
15031496

1497+
/*
1498+
* Page is either isolated or there is not enough space on the target
1499+
* node. If isolated, then it has taken a reference count and the
1500+
* callers reference can be safely dropped without the page
1501+
* disappearing underneath us during migration. Otherwise the page is
1502+
* not to be migrated but the callers reference should still be
1503+
* dropped so it does not leak.
1504+
*/
1505+
put_page(page);
1506+
15041507
if (isolated) {
15051508
int nr_remaining;
15061509

0 commit comments

Comments
 (0)