]> err.no Git - linux-2.6/blobdiff - mm/readahead.c
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
[linux-2.6] / 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;
                }
        }