Skip to content

Commit

Permalink
[PATCH] read_cache_pages() cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed Dec 7, 2006
1 parent 8bca98c commit 38da288
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions mm/readahead.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 38da288

Please sign in to comment.