]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs/mpage.c:mpage_readpages(): use lru_to_page() helper
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 9 Feb 2016 23:12:07 +0000 (10:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 9 Feb 2016 23:12:07 +0000 (10:12 +1100)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/mpage.c

index 1480d3a180370fe3922a7724e613d09b896f9d00..6bd9fd90964e2670808ee1d586b4080d68f2a1f1 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/highmem.h>
 #include <linux/prefetch.h>
 #include <linux/mpage.h>
+#include <linux/mm_inline.h>
 #include <linux/writeback.h>
 #include <linux/backing-dev.h>
 #include <linux/pagevec.h>
@@ -366,7 +367,7 @@ mpage_readpages(struct address_space *mapping, struct list_head *pages,
        map_bh.b_state = 0;
        map_bh.b_size = 0;
        for (page_idx = 0; page_idx < nr_pages; page_idx++) {
-               struct page *page = list_entry(pages->prev, struct page, lru);
+               struct page *page = lru_to_page(pages);
 
                prefetchw(&page->flags);
                list_del(&page->lru);