diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/vmscan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index d303b60f4c2a..890f54184d9a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1207,13 +1207,16 @@ int isolate_lru_page(struct page *page) | |||
1207 | { | 1207 | { |
1208 | int ret = -EBUSY; | 1208 | int ret = -EBUSY; |
1209 | 1209 | ||
1210 | VM_BUG_ON(!page_count(page)); | ||
1211 | |||
1210 | if (PageLRU(page)) { | 1212 | if (PageLRU(page)) { |
1211 | struct zone *zone = page_zone(page); | 1213 | struct zone *zone = page_zone(page); |
1212 | 1214 | ||
1213 | spin_lock_irq(&zone->lru_lock); | 1215 | spin_lock_irq(&zone->lru_lock); |
1214 | if (PageLRU(page) && get_page_unless_zero(page)) { | 1216 | if (PageLRU(page)) { |
1215 | int lru = page_lru(page); | 1217 | int lru = page_lru(page); |
1216 | ret = 0; | 1218 | ret = 0; |
1219 | get_page(page); | ||
1217 | ClearPageLRU(page); | 1220 | ClearPageLRU(page); |
1218 | 1221 | ||
1219 | del_page_from_lru_list(zone, page, lru); | 1222 | del_page_from_lru_list(zone, page, lru); |