summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2006-12-06 20:36:46 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 08:39:34 -0800
commit38da288b8ba2b07b4e07165027e650b61d7c8ffc (patch)
tree71382f10406db9598cef7df3842e428c77cae728 /mm
parent8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6 (diff)
downloadop-kernel-dev-38da288b8ba2b07b4e07165027e650b61d7c8ffc.zip
op-kernel-dev-38da288b8ba2b07b4e07165027e650b61d7c8ffc.tar.gz
[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>
Diffstat (limited to 'mm')
-rw-r--r--mm/readahead.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/readahead.c b/mm/readahead.c
index 23cb61a..a386f2b 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;
}
}
OpenPOWER on IntegriCloud