[PATCH] mm/vmscan: remove checking on PG_lru

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Function __isolate_lru_page() is called by isolate_lru_pages() or
isolate_migratepages_range(). For both cases, the PG_lru flag for
the target page frame has been checked. So we needn't check that
again in function __isolate_lru_page() and just remove the check
in function __isolate_lru_page().

Signed-off-by: Gavin Shan <shangw@xxxxxxxxxxxxxxxxxx>
---
 mm/vmscan.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 6615763..77d5704 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -940,10 +940,6 @@ int __isolate_lru_page(struct page *page, isolate_mode_t mode)
 {
 	int ret = -EINVAL;
 
-	/* Only take pages on the LRU. */
-	if (!PageLRU(page))
-		return ret;
-
 	/* Do not give back unevictable pages for compaction */
 	if (PageUnevictable(page))
 		return ret;
-- 
1.7.5.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]