diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2006-12-06 23:36:46 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:34 -0500 |
commit | 38da288b8ba2b07b4e07165027e650b61d7c8ffc (patch) | |
tree | 71382f10406db9598cef7df3842e428c77cae728 | |
parent | 8bca98cabf6db738b06d6f3b6d4b6c5f2a5cb7b6 (diff) |
[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>
-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, | |||
148 | if (!pagevec_add(&lru_pvec, page)) | 148 | if (!pagevec_add(&lru_pvec, page)) |
149 | __pagevec_lru_add(&lru_pvec); | 149 | __pagevec_lru_add(&lru_pvec); |
150 | if (ret) { | 150 | if (ret) { |
151 | while (!list_empty(pages)) { | 151 | put_pages_list(pages); |
152 | struct page *victim; | ||
153 | |||
154 | victim = list_to_page(pages); | ||
155 | list_del(&victim->lru); | ||
156 | page_cache_release(victim); | ||
157 | } | ||
158 | break; | 152 | break; |
159 | } | 153 | } |
160 | } | 154 | } |