Merge branch 'akpm' (patches from Andrew)
[linux-2.6-block.git] / fs / ocfs2 / aops.c
index eb1ce30412dc3e09d1fbd4c8e890d86c2d0a4c9f..832c1759a09af49b029bfa49583fcda2d791ad95 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/quotaops.h>
 #include <linux/blkdev.h>
 #include <linux/uio.h>
+#include <linux/mm.h>
 
 #include <cluster/masklog.h>
 
@@ -397,7 +398,7 @@ static int ocfs2_readpages(struct file *filp, struct address_space *mapping,
         * Check whether a remote node truncated this file - we just
         * drop out in that case as it's not worth handling here.
         */
-       last = list_entry(pages->prev, struct page, lru);
+       last = lru_to_page(pages);
        start = (loff_t)last->index << PAGE_SHIFT;
        if (start >= i_size_read(inode))
                goto out_unlock;