From 2f36e9abf4f1db576b90664e0cfca40d55752292 Mon Sep 17 00:00:00 2001 From: Johannes Weiner Date: Mon, 21 Sep 2009 17:02:59 -0700 Subject: [PATCH] --- yaml --- r: 164447 b: refs/heads/master c: 6c0b13519d1c755d874e82c8fb8a6dcef0ee402c h: refs/heads/master i: 164445: a5c13eb5982324f37a4055bc2394332316bb4fc0 164443: b4413bc345c505d235d455f67c0f9c829856860d 164439: def1ed390a65b2826407a90d692f168309818b01 164431: ad58125cea545090c7364238eb9d9ed79f823574 164415: 2100486e7f9b28a59517b2aae8fb6c38c03216d1 v: v3 --- [refs] | 2 +- trunk/include/linux/mm_inline.h | 8 ++------ trunk/mm/migrate.c | 6 +++--- trunk/mm/swap.c | 2 +- trunk/mm/vmscan.c | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 560dbb2df61b..81223a250166 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 401a8e1c1670085b8177330ca47d4f7c4ac88761 +refs/heads/master: 6c0b13519d1c755d874e82c8fb8a6dcef0ee402c diff --git a/trunk/include/linux/mm_inline.h b/trunk/include/linux/mm_inline.h index 99977ff45b83..8835b877b8db 100644 --- a/trunk/include/linux/mm_inline.h +++ b/trunk/include/linux/mm_inline.h @@ -5,7 +5,7 @@ * page_is_file_cache - should the page be on a file LRU or anon LRU? * @page: the page to test * - * Returns LRU_FILE if @page is page cache page backed by a regular filesystem, + * Returns 1 if @page is page cache page backed by a regular filesystem, * or 0 if @page is anonymous, tmpfs or otherwise ram or swap backed. * Used by functions that manipulate the LRU lists, to sort a page * onto the right LRU list. @@ -16,11 +16,7 @@ */ static inline int page_is_file_cache(struct page *page) { - if (PageSwapBacked(page)) - return 0; - - /* The page is page cache backed by a normal filesystem. */ - return LRU_FILE; + return !PageSwapBacked(page); } static inline void diff --git a/trunk/mm/migrate.c b/trunk/mm/migrate.c index b535a2c1656c..e97e513fe898 100644 --- a/trunk/mm/migrate.c +++ b/trunk/mm/migrate.c @@ -68,7 +68,7 @@ int putback_lru_pages(struct list_head *l) list_for_each_entry_safe(page, page2, l, lru) { list_del(&page->lru); dec_zone_page_state(page, NR_ISOLATED_ANON + - !!page_is_file_cache(page)); + page_is_file_cache(page)); putback_lru_page(page); count++; } @@ -701,7 +701,7 @@ static int unmap_and_move(new_page_t get_new_page, unsigned long private, */ list_del(&page->lru); dec_zone_page_state(page, NR_ISOLATED_ANON + - !!page_is_file_cache(page)); + page_is_file_cache(page)); putback_lru_page(page); } @@ -751,7 +751,7 @@ int migrate_pages(struct list_head *from, local_irq_save(flags); list_for_each_entry(page, from, lru) __inc_zone_page_state(page, NR_ISOLATED_ANON + - !!page_is_file_cache(page)); + page_is_file_cache(page)); local_irq_restore(flags); if (!swapwrite) diff --git a/trunk/mm/swap.c b/trunk/mm/swap.c index 168d53e6e58e..4a8a59e671f7 100644 --- a/trunk/mm/swap.c +++ b/trunk/mm/swap.c @@ -189,7 +189,7 @@ void activate_page(struct page *page) add_page_to_lru_list(zone, page, lru); __count_vm_event(PGACTIVATE); - update_page_reclaim_stat(zone, page, !!file, 1); + update_page_reclaim_stat(zone, page, file, 1); } spin_unlock_irq(&zone->lru_lock); } diff --git a/trunk/mm/vmscan.c b/trunk/mm/vmscan.c index 30e56ee833f8..172119caebcc 100644 --- a/trunk/mm/vmscan.c +++ b/trunk/mm/vmscan.c @@ -821,7 +821,7 @@ int __isolate_lru_page(struct page *page, int mode, int file) if (mode != ISOLATE_BOTH && (!PageActive(page) != !mode)) return ret; - if (mode != ISOLATE_BOTH && (!page_is_file_cache(page) != !file)) + if (mode != ISOLATE_BOTH && page_is_file_cache(page) != file) return ret; /*