]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/readahead.c
[PATCH] read_cache_pages() cleanup
[linux-2.6-omap-h63xx.git] / mm / readahead.c
index 23cb61a01c6e4123f313f5487a5942e7ee4c5fe4..a386f2b6b3354d9736ad76495f6dfc8e6224fb61 100644 (file)
@@ -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;
                }
        }