orangefs: use folios in orangefs_readahead
[sfrench/cifs-2.6.git] / fs / orangefs / inode.c
index aefdf1d3be7c4a0689dc6ff54e7faf651b8e4966..9014bbcc80317e097091201c5fc8f0d822689b8d 100644 (file)
@@ -244,7 +244,7 @@ static void orangefs_readahead(struct readahead_control *rac)
        struct iov_iter iter;
        struct inode *inode = rac->mapping->host;
        struct xarray *i_pages;
-       struct page *page;
+       struct folio *folio;
        loff_t new_start = readahead_pos(rac);
        int ret;
        size_t new_len = 0;
@@ -275,9 +275,10 @@ static void orangefs_readahead(struct readahead_control *rac)
                ret = 0;
 
        /* clean up. */
-       while ((page = readahead_page(rac))) {
-               page_endio(page, false, ret);
-               put_page(page);
+       while ((folio = readahead_folio(rac))) {
+               if (!ret)
+                       folio_mark_uptodate(folio);
+               folio_unlock(folio);
        }
 }