From 38da288b8ba2b07b4e07165027e650b61d7c8ffc Mon Sep 17 00:00:00 2001 From: OGAWA Hirofumi Date: Wed, 6 Dec 2006 20:36:46 -0800 Subject: [PATCH] [PATCH] read_cache_pages() cleanup Use put_pages_list() instead of opencoding it. Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/readahead.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 23cb61a01c..a386f2b6b3 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -148,13 +148,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages, 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; } } -- 2.39.5