diff options
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 83369058ec13..36f42573a335 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -93,6 +93,8 @@ | |||
93 | #include <asm/tlbflush.h> | 93 | #include <asm/tlbflush.h> |
94 | #include <asm/uaccess.h> | 94 | #include <asm/uaccess.h> |
95 | 95 | ||
96 | #include "internal.h" | ||
97 | |||
96 | /* Internal flags */ | 98 | /* Internal flags */ |
97 | #define MPOL_MF_DISCONTIG_OK (MPOL_MF_INTERNAL << 0) /* Skip checks for continuous vmas */ | 99 | #define MPOL_MF_DISCONTIG_OK (MPOL_MF_INTERNAL << 0) /* Skip checks for continuous vmas */ |
98 | #define MPOL_MF_INVERT (MPOL_MF_INTERNAL << 1) /* Invert check for nodemask */ | 100 | #define MPOL_MF_INVERT (MPOL_MF_INTERNAL << 1) /* Invert check for nodemask */ |
@@ -762,8 +764,11 @@ static void migrate_page_add(struct page *page, struct list_head *pagelist, | |||
762 | /* | 764 | /* |
763 | * Avoid migrating a page that is shared with others. | 765 | * Avoid migrating a page that is shared with others. |
764 | */ | 766 | */ |
765 | if ((flags & MPOL_MF_MOVE_ALL) || page_mapcount(page) == 1) | 767 | if ((flags & MPOL_MF_MOVE_ALL) || page_mapcount(page) == 1) { |
766 | isolate_lru_page(page, pagelist); | 768 | if (!isolate_lru_page(page)) { |
769 | list_add_tail(&page->lru, pagelist); | ||
770 | } | ||
771 | } | ||
767 | } | 772 | } |
768 | 773 | ||
769 | static struct page *new_node_page(struct page *page, unsigned long node, int **x) | 774 | static struct page *new_node_page(struct page *page, unsigned long node, int **x) |
@@ -2197,7 +2202,7 @@ static void gather_stats(struct page *page, void *private, int pte_dirty) | |||
2197 | if (PageSwapCache(page)) | 2202 | if (PageSwapCache(page)) |
2198 | md->swapcache++; | 2203 | md->swapcache++; |
2199 | 2204 | ||
2200 | if (PageActive(page)) | 2205 | if (PageActive(page) || PageUnevictable(page)) |
2201 | md->active++; | 2206 | md->active++; |
2202 | 2207 | ||
2203 | if (PageWriteback(page)) | 2208 | if (PageWriteback(page)) |