mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] read_cache_pages() cleanup
Use put_pages_list() instead of opencoding it. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8bca98cabf
commit
38da288b8b
1 changed files with 1 additions and 7 deletions
|
@ -148,13 +148,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages,
|
||||||
if (!pagevec_add(&lru_pvec, page))
|
if (!pagevec_add(&lru_pvec, page))
|
||||||
__pagevec_lru_add(&lru_pvec);
|
__pagevec_lru_add(&lru_pvec);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
while (!list_empty(pages)) {
|
put_pages_list(pages);
|
||||||
struct page *victim;
|
|
||||||
|
|
||||||
victim = list_to_page(pages);
|
|
||||||
list_del(&victim->lru);
|
|
||||||
page_cache_release(victim);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue