[PATCH] read_cache_pages() cleanup

From: OGAWA Hirofumi
Date: Sun Oct 29 2006 - 10:57:06 EST


This uses put_pages_list() instead of opencoded one.

Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
---

mm/readahead.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff -puN mm/readahead.c~read_cache_pages-cleanup mm/readahead.c
--- linux-2.6/mm/readahead.c~read_cache_pages-cleanup 2006-10-30 00:12:20.000000000 +0900
+++ linux-2.6-hirofumi/mm/readahead.c 2006-10-30 00:12:20.000000000 +0900
@@ -148,13 +148,7 @@ int read_cache_pages(struct address_spac
if (!pagevec_add(&lru_pvec, page))
__pagevec_lru_add(&lru_pvec);
if (ret) {
- while (!list_empty(pages)) {
- struct page *victim;
-
- victim = list_to_page(pages);
- list_del(&victim->lru);
- page_cache_release(victim);
- }
+ put_pages_list(pages);
break;
}
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/