diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index c8d87221f368..37c73b902008 100644 --- a/mm/migrate.c +++ b/mm/migrate.c | |||
@@ -49,9 +49,8 @@ int isolate_lru_page(struct page *page, struct list_head *pagelist) | |||
49 | struct zone *zone = page_zone(page); | 49 | struct zone *zone = page_zone(page); |
50 | 50 | ||
51 | spin_lock_irq(&zone->lru_lock); | 51 | spin_lock_irq(&zone->lru_lock); |
52 | if (PageLRU(page)) { | 52 | if (PageLRU(page) && get_page_unless_zero(page)) { |
53 | ret = 0; | 53 | ret = 0; |
54 | get_page(page); | ||
55 | ClearPageLRU(page); | 54 | ClearPageLRU(page); |
56 | if (PageActive(page)) | 55 | if (PageActive(page)) |
57 | del_page_from_active_list(zone, page); | 56 | del_page_from_active_list(zone, page); |