diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/backing-dev.c | 3 | ||||
-rw-r--r-- | mm/swap.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index f2e574dbc300..2a56124dbc28 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -176,6 +176,9 @@ int bdi_register(struct backing_dev_info *bdi, struct device *parent, | |||
176 | int ret = 0; | 176 | int ret = 0; |
177 | struct device *dev; | 177 | struct device *dev; |
178 | 178 | ||
179 | if (WARN_ON(bdi->dev)) | ||
180 | goto exit; | ||
181 | |||
179 | va_start(args, fmt); | 182 | va_start(args, fmt); |
180 | dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); | 183 | dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, args); |
181 | va_end(args); | 184 | va_end(args); |
@@ -445,6 +445,7 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru) | |||
445 | for (i = 0; i < pagevec_count(pvec); i++) { | 445 | for (i = 0; i < pagevec_count(pvec); i++) { |
446 | struct page *page = pvec->pages[i]; | 446 | struct page *page = pvec->pages[i]; |
447 | struct zone *pagezone = page_zone(page); | 447 | struct zone *pagezone = page_zone(page); |
448 | int file; | ||
448 | 449 | ||
449 | if (pagezone != zone) { | 450 | if (pagezone != zone) { |
450 | if (zone) | 451 | if (zone) |
@@ -456,8 +457,12 @@ void ____pagevec_lru_add(struct pagevec *pvec, enum lru_list lru) | |||
456 | VM_BUG_ON(PageUnevictable(page)); | 457 | VM_BUG_ON(PageUnevictable(page)); |
457 | VM_BUG_ON(PageLRU(page)); | 458 | VM_BUG_ON(PageLRU(page)); |
458 | SetPageLRU(page); | 459 | SetPageLRU(page); |
459 | if (is_active_lru(lru)) | 460 | file = is_file_lru(lru); |
461 | zone->recent_scanned[file]++; | ||
462 | if (is_active_lru(lru)) { | ||
460 | SetPageActive(page); | 463 | SetPageActive(page); |
464 | zone->recent_rotated[file]++; | ||
465 | } | ||
461 | add_page_to_lru_list(zone, page, lru); | 466 | add_page_to_lru_list(zone, page, lru); |
462 | } | 467 | } |
463 | if (zone) | 468 | if (zone) |