diff options
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index c550230664b1..1a205503be3f 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -647,6 +647,14 @@ void migrate_page_states(struct page *newpage, struct page *page) if (PageWriteback(newpage)) end_page_writeback(newpage); + /* + * PG_readahead shares the same bit with PG_reclaim. The above + * end_page_writeback() may clear PG_readahead mistakenly, so set the + * bit after that. + */ + if (PageReadahead(page)) + SetPageReadahead(newpage); + copy_page_owner(page, newpage); mem_cgroup_migrate(page, newpage); |