[PATCH] read_cache_pages() cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This uses put_pages_list() instead of opencoded one.

Signed-off-by: OGAWA Hirofumi <[email protected]>
---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux