Messages in this thread Patch in this message | | | Subject | [PATCH] read_cache_pages() cleanup | From | OGAWA Hirofumi <> | Date | Mon, 30 Oct 2006 00:56:37 +0900 |
| |
This uses put_pages_list() instead of opencoded one.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ---
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |