lkml.org 
[lkml]   [2006]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] read_cache_pages() cleanup
From
Date
This uses put_pages_list() instead of opencoded one.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
---

mm/readahead.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff -puN mm/readahead.c~read_cache_pages-cleanup mm/readahead.c
--- linux-2.6/mm/readahead.c~read_cache_pages-cleanup 2006-10-30 00:12:20.000000000 +0900
+++ linux-2.6-hirofumi/mm/readahead.c 2006-10-30 00:12:20.000000000 +0900
@@ -148,13 +148,7 @@ int read_cache_pages(struct address_spac
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;
}
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-10-29 16:59    [W:0.298 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site