[linux-mm-cc] [PATCH 11/12] void OOM : clean up after

IKEDA Munehiro m-ikeda at ds.jp.nec.com
Mon Jul 23 06:10:25 EDT 2007


Delete unnecessary commented-out code.

Signed-off-by: IKEDA, Munehiro <m-ikeda at ds.jp.nec.com>
---
 mm/ccache.c |   24 ++----------------------
 1 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/mm/ccache.c b/mm/ccache.c
index 3010ab8..83997ec 100644
--- a/mm/ccache.c
+++ b/mm/ccache.c
@@ -801,9 +801,7 @@ static struct page *cc_readpage(struct chunk_head *ch)
 	CC_DEBUG2("start");
 
 	/* collect compressed page from chunks */
-#if 0
-	comp_page = alloc_page(GFP_ATOMIC);
-#endif
+
 	/*
 	 * This allocation must never sleep and must never fail.
 	 * -- Doing GFP_ATOMIC will guarantee that I doesn't sleep
@@ -820,9 +818,7 @@ static struct page *cc_readpage(struct chunk_head *ch)
 		goto out;
 	}
 	comp_data = page_address(comp_page);
-#if 0
-	decomp_page = alloc_page(GFP_ATOMIC);
-#endif
+
 	/* same comments apply as for comp_page alloc */
 	decomp_page = alloc_or_eat_ccache_lock(__GFP_NOFAIL, 0, ch);
 	if (!decomp_page) {
@@ -930,14 +926,6 @@ int cc_writepage(struct page *page)
 	}
 	CC_DEBUG2("after get_enough_chunks");
 
-#if 0
-	CC_DEBUG2("before chunk_head lru add");
-	spin_lock(&ccache_lock);
-	list_add(&ch->lru, &lru_head);
-	spin_unlock(&ccache_lock);
-	CC_DEBUG2("after chunk_head lru add");
-#endif
-
 	CC_DEBUG2("before copy_to_chunks");
 	copy_to_chunks(ch, tmp_page, comp_size);
 	CC_DEBUG2("after copy_to_chunks");
@@ -955,13 +943,6 @@ int cc_writepage(struct page *page)
 		goto out_locked;
 	}
 
-#if 0
-	SetPageWriteback(page);
-	slot=(struct page **)radix_tree_tag_set_slot(&mapping->page_tree,
-				page_index(page),
-				PAGECACHE_TAG_WRITEBACK);
-#endif
-
 	slot = (struct page **)radix_tree_lookup_slot(&mapping->page_tree,
 						page_index(page));
 	BUG_ON(!slot);
@@ -980,7 +961,6 @@ int cc_writepage(struct page *page)
 	
 	/* replace radix node with chunk_head */
 	CC_DEBUG2("before set slot");
-	//*slot = (struct page *)ch;
 	radix_tree_replace_slot((void **)slot, (void *)ch);
 	CC_DEBUG2("after set slot");
 
-- 
1.4.4.4



More information about the linux-mm-cc mailing list