Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344791
b: refs/heads/master
c: 149c33e
h: refs/heads/master
i:
  344789: 301bc25
  344787: a77259b
  344783: 409cb0f
v: v3
  • Loading branch information
Mel Gorman committed Dec 11, 2012
1 parent 5c71df4 commit 9e71691
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7039e1dbec6eeaa8ecab43a82d6589eeced995c3
refs/heads/master: 149c33e1c98f83050870514f380902dc6d617bd5
17 changes: 10 additions & 7 deletions trunk/mm/migrate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1489,18 +1489,21 @@ int migrate_misplaced_page(struct page *page, int node)
}
isolated = 1;

/*
* Page is isolated which takes a reference count so now the
* callers reference can be safely dropped without the page
* disappearing underneath us during migration
*/
put_page(page);

page_lru = page_is_file_cache(page);
inc_zone_page_state(page, NR_ISOLATED_ANON + page_lru);
list_add(&page->lru, &migratepages);
}

/*
* Page is either isolated or there is not enough space on the target
* node. If isolated, then it has taken a reference count and the
* callers reference can be safely dropped without the page
* disappearing underneath us during migration. Otherwise the page is
* not to be migrated but the callers reference should still be
* dropped so it does not leak.
*/
put_page(page);

if (isolated) {
int nr_remaining;

Expand Down

0 comments on commit 9e71691

Please sign in to comment.