* [f2fs-dev] [PATCH v5 01/12] f2fs: drop usage of page_index
[not found] <20240510114747.21548-1-ryncsn@gmail.com>
@ 2024-05-10 11:47 ` Kairui Song
0 siblings, 0 replies; only message in thread
From: Kairui Song @ 2024-05-10 11:47 UTC (permalink / raw)
To: linux-mm
Cc: Kairui Song, Ryan Roberts, Chris Li, Neil Brown,
David Hildenbrand, Hugh Dickins, linux-kernel, Matthew Wilcox,
linux-f2fs-devel, Yosry Ahmed, Minchan Kim, Barry Song, Huang,
Ying, linux-fsdevel, Jaegeuk Kim, Andrew Morton
From: Kairui Song <kasong@tencent.com>
page_index is needed for mixed usage of page cache and swap cache,
for pure page cache usage, the caller can just use page->index instead.
It can't be a swap cache page here, so just drop it.
[ This commit will not be needed once f2fs converted
f2fs_mpage_readpages() to use folio]
Signed-off-by: Kairui Song <kasong@tencent.com>
Cc: Chao Yu <chao@kernel.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
---
fs/f2fs/data.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 961e6ff77c72..c0e1459702e6 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -2057,7 +2057,7 @@ static int f2fs_read_single_page(struct inode *inode, struct page *page,
sector_t block_nr;
int ret = 0;
- block_in_file = (sector_t)page_index(page);
+ block_in_file = (sector_t)page->index;
last_block = block_in_file + nr_pages;
last_block_in_file = bytes_to_blks(inode,
f2fs_readpage_limit(inode) + blocksize - 1);
--
2.45.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-05-10 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20240510114747.21548-1-ryncsn@gmail.com>
2024-05-10 11:47 ` [f2fs-dev] [PATCH v5 01/12] f2fs: drop usage of page_index Kairui Song
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).