diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-07-08 18:03:44 +0100 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-07-22 15:57:32 +0000 |
| commit | 587b2df524f9cd3f799d7196315453b5f2b01813 (patch) | |
| tree | ad7fa02dd8ee75fbc7385f80fb1d88df50697fe9 | |
| parent | f2fs: Use a folio iterator in f2fs_handle_step_decompress() (diff) | |
| download | linux-587b2df524f9cd3f799d7196315453b5f2b01813.tar.gz linux-587b2df524f9cd3f799d7196315453b5f2b01813.zip | |
f2fs: Pass a folio to f2fs_end_read_compressed_page()
Both callers now have a folio so pass it in.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/compress.c | 7 | ||||
| -rw-r--r-- | fs/f2fs/data.c | 4 | ||||
| -rw-r--r-- | fs/f2fs/f2fs.h | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 10b4230607de..5847d22a5833 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -801,11 +801,10 @@ out_end_io: * page being waited on in the cluster, and if so, it decompresses the cluster * (or in the case of a failure, cleans up without actually decompressing). */ -void f2fs_end_read_compressed_page(struct page *page, bool failed, +void f2fs_end_read_compressed_page(struct folio *folio, bool failed, block_t blkaddr, bool in_task) { - struct decompress_io_ctx *dic = - (struct decompress_io_ctx *)page_private(page); + struct decompress_io_ctx *dic = folio->private; struct f2fs_sb_info *sbi = dic->sbi; dec_page_count(sbi, F2FS_RD_DATA); @@ -813,7 +812,7 @@ void f2fs_end_read_compressed_page(struct page *page, bool failed, if (failed) WRITE_ONCE(dic->failed, true); else if (blkaddr && in_task) - f2fs_cache_compressed_page(sbi, page, + f2fs_cache_compressed_page(sbi, &folio->page, dic->inode->i_ino, blkaddr); if (atomic_dec_and_test(&dic->remaining_pages)) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 47c10cec1540..092c9871acdf 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -144,7 +144,7 @@ static void f2fs_finish_read_bio(struct bio *bio, bool in_task) if (f2fs_is_compressed_page(&folio->page)) { if (ctx && !ctx->decompression_attempted) - f2fs_end_read_compressed_page(&folio->page, true, 0, + f2fs_end_read_compressed_page(folio, true, 0, in_task); f2fs_put_folio_dic(folio, in_task); continue; @@ -241,7 +241,7 @@ static void f2fs_handle_step_decompress(struct bio_post_read_ctx *ctx, struct folio *folio = fi.folio; if (f2fs_is_compressed_page(&folio->page)) - f2fs_end_read_compressed_page(&folio->page, false, blkaddr, + f2fs_end_read_compressed_page(folio, false, blkaddr, in_task); else all_compressed = false; diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c9e1bf89bbfa..2c3b6ea5c1d2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -4487,7 +4487,7 @@ bool f2fs_is_compress_level_valid(int alg, int lvl); int __init f2fs_init_compress_mempool(void); void f2fs_destroy_compress_mempool(void); void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task); -void f2fs_end_read_compressed_page(struct page *page, bool failed, +void f2fs_end_read_compressed_page(struct folio *folio, bool failed, block_t blkaddr, bool in_task); bool f2fs_cluster_is_empty(struct compress_ctx *cc); bool f2fs_cluster_can_merge_page(struct compress_ctx *cc, pgoff_t index); @@ -4561,7 +4561,7 @@ static inline int __init f2fs_init_compress_mempool(void) { return 0; } static inline void f2fs_destroy_compress_mempool(void) { } static inline void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task) { } -static inline void f2fs_end_read_compressed_page(struct page *page, +static inline void f2fs_end_read_compressed_page(struct folio *folio, bool failed, block_t blkaddr, bool in_task) { WARN_ON_ONCE(1); |
