Skip to content

Commit 911e9c4

Browse files
hsiangkaogregkh
authored andcommitted
erofs: adapt folios for z_erofs_read_folio()
[ Upstream commit c33ad3b2b7100ac944aad38d3ebc89cb5f654e94 ] It's a straight-forward conversion and no logic changes (except that it renames the corresponding tracepoint.) Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Gao Xiang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Stable-dep-of: 99f7619a77a0 ("erofs: fix to add missing tracepoint in erofs_read_folio()") Signed-off-by: Sasha Levin <[email protected]>
1 parent 5220cfe commit 911e9c4

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

fs/erofs/zdata.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,17 +1680,16 @@ static void z_erofs_pcluster_readmore(struct z_erofs_decompress_frontend *f,
16801680

16811681
static int z_erofs_read_folio(struct file *file, struct folio *folio)
16821682
{
1683-
struct page *page = &folio->page;
1684-
struct inode *const inode = page->mapping->host;
1683+
struct inode *const inode = folio->mapping->host;
16851684
struct erofs_sb_info *const sbi = EROFS_I_SB(inode);
16861685
struct z_erofs_decompress_frontend f = DECOMPRESS_FRONTEND_INIT(inode);
16871686
int err;
16881687

1689-
trace_erofs_readpage(page, false);
1690-
f.headoffset = (erofs_off_t)page->index << PAGE_SHIFT;
1688+
trace_erofs_read_folio(folio, false);
1689+
f.headoffset = (erofs_off_t)folio->index << PAGE_SHIFT;
16911690

16921691
z_erofs_pcluster_readmore(&f, NULL, true);
1693-
err = z_erofs_do_read_page(&f, page);
1692+
err = z_erofs_do_read_page(&f, &folio->page);
16941693
z_erofs_pcluster_readmore(&f, NULL, false);
16951694
(void)z_erofs_collector_end(&f);
16961695

include/trace/events/erofs.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ TRACE_EVENT(erofs_fill_inode,
7575
__entry->blkaddr, __entry->ofs)
7676
);
7777

78-
TRACE_EVENT(erofs_readpage,
78+
TRACE_EVENT(erofs_read_folio,
7979

80-
TP_PROTO(struct page *page, bool raw),
80+
TP_PROTO(struct folio *folio, bool raw),
8181

82-
TP_ARGS(page, raw),
82+
TP_ARGS(folio, raw),
8383

8484
TP_STRUCT__entry(
8585
__field(dev_t, dev )
@@ -91,11 +91,11 @@ TRACE_EVENT(erofs_readpage,
9191
),
9292

9393
TP_fast_assign(
94-
__entry->dev = page->mapping->host->i_sb->s_dev;
95-
__entry->nid = EROFS_I(page->mapping->host)->nid;
96-
__entry->dir = S_ISDIR(page->mapping->host->i_mode);
97-
__entry->index = page->index;
98-
__entry->uptodate = PageUptodate(page);
94+
__entry->dev = folio->mapping->host->i_sb->s_dev;
95+
__entry->nid = EROFS_I(folio->mapping->host)->nid;
96+
__entry->dir = S_ISDIR(folio->mapping->host->i_mode);
97+
__entry->index = folio->index;
98+
__entry->uptodate = folio_test_uptodate(folio);
9999
__entry->raw = raw;
100100
),
101101

0 commit comments

Comments
 (0)