Skip to content
Snippets Groups Projects
Commit 38da288b authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Linus Torvalds
Browse files

[PATCH] read_cache_pages() cleanup


Use put_pages_list() instead of opencoding it.

Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8bca98ca
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment