diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2006-12-06 20:36:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 08:39:34 -0800 |
commit | 38da288b8ba2b07b4e07165027e650b61d7c8ffc (patch) | |
tree | 71382f10406db9598cef7df3842e428c77cae728 /mm | |
parent | 8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6 (diff) | |
download | lwn-38da288b8ba2b07b4e07165027e650b61d7c8ffc.tar.gz lwn-38da288b8ba2b07b4e07165027e650b61d7c8ffc.zip |
[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.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index 23cb61a01c6e..a386f2b6b335 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; } } |