提交 38da288b 编写于 作者: O OGAWA Hirofumi 提交者: Linus Torvalds

[PATCH] read_cache_pages() cleanup

Use put_pages_list() instead of opencoding it.
Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 8bca98ca
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册