lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 3/3] orangefs: use folio in orangefs_readahead()
Date
Use folio and its corresponding function in orangefs_readahead() so that
folios can be directly passed to the folio_endio().

Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
fs/orangefs/inode.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index b12d099510ea..7e03d60bd406 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -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,9 @@ static void orangefs_readahead(struct readahead_control *rac)
ret = 0;

/* clean up. */
- while ((page = readahead_page(rac))) {
- folio_endio(page_folio(page), false, ret);
- put_page(page);
+ while ((folio = readahead_folio(rac))) {
+ folio_endio(folio, false, ret);
+ folio_put(folio);
}
}

--
2.34.1
\
 
 \ /
  Last update: 2023-03-27 01:01    [W:0.108 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site