aa-180-activate_page_cleanup

Andrew Morton (akpm@zip.com.au)
Tue, 19 Mar 2002 20:02:24 -0800


Fold activate_page_nolock() into activate_page().

=====================================

--- 2.4.19-pre3/mm/swap.c~aa-180-activate_page_cleanup Tue Mar 19 19:49:03 2002
+++ 2.4.19-pre3-akpm/mm/swap.c Tue Mar 19 19:49:03 2002
@@ -36,18 +36,17 @@ pager_daemon_t pager_daemon = {
/*
* Move an inactive page to the active list.
*/
-static inline void activate_page_nolock(struct page * page)
-{
- if (PageLRU(page) && !PageActive(page)) {
- del_page_from_inactive_list(page);
- add_page_to_active_list(page);
- }
-}
-
void activate_page(struct page * page)
{
spin_lock(&pagemap_lru_lock);
- activate_page_nolock(page);
+ if (PageLRU(page)) {
+ if (!PageActive(page)) {
+ del_page_from_inactive_list(page);
+ add_page_to_active_list(page);
+ ClearPageReferenced(page);
+ } else
+ SetPageReferenced(page);
+ }
spin_unlock(&pagemap_lru_lock);
}

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/