diff options
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/swap.c b/mm/swap.c index afeabe3133e7..270b520e4f4b 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -565,13 +565,15 @@ static void __lru_cache_add(struct page *page) */ void lru_cache_add_anon(struct page *page) { - ClearPageActive(page); + if (PageActive(page)) + ClearPageActive(page); __lru_cache_add(page); } void lru_cache_add_file(struct page *page) { - ClearPageActive(page); + if (PageActive(page)) + ClearPageActive(page); __lru_cache_add(page); } EXPORT_SYMBOL(lru_cache_add_file); |