mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] f2fs: use folio_end_read
@ 2026-01-16  4:32 Jaegeuk Kim
  2026-01-16  8:54 ` [f2fs-dev] " Chao Yu
  2026-01-19 13:50 ` patchwork-bot+f2fs
  0 siblings, 2 replies; 3+ messages in thread
From: Jaegeuk Kim @ 2026-01-16  4:32 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim, Matthew Wilcox (Oracle)

No logic change.

Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/data.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 4e2f10bd2b07..5b4832956196 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2566,19 +2566,15 @@ static int f2fs_read_data_large_folio(struct inode *inode,
 	}
 	trace_f2fs_read_folio(folio, DATA);
 	if (rac) {
-		if (!folio_in_bio) {
-			folio_mark_uptodate(folio);
-			folio_unlock(folio);
-		}
+		if (!folio_in_bio)
+			folio_end_read(folio, true);
 		folio = readahead_folio(rac);
 		goto next_folio;
 	}
 err_out:
 	/* Nothing was submitted. */
 	if (!bio) {
-		if (!ret)
-			folio_mark_uptodate(folio);
-		folio_unlock(folio);
+		folio_end_read(folio, !ret);
 		return ret;
 	}
 
-- 
2.52.0.457.g6b5491de43-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-19 13:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-16  4:32 [PATCH] f2fs: use folio_end_read Jaegeuk Kim
2026-01-16  8:54 ` [f2fs-dev] " Chao Yu
2026-01-19 13:50 ` patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®