diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-07-08 18:03:46 +0100 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-07-22 15:57:38 +0000 |
| commit | 9e3d138737f8b7a26d078dc088ed33da87884723 (patch) | |
| tree | 33ed13ed8f5bf15ecb431f8a8295ad24f3433266 /fs/f2fs/compress.c | |
| parent | f2fs: Use a folio iterator in f2fs_verify_bio() (diff) | |
| download | linux-9e3d138737f8b7a26d078dc088ed33da87884723.tar.gz linux-9e3d138737f8b7a26d078dc088ed33da87884723.zip | |
f2fs: Pass a folio to f2fs_is_compressed_page()
All callers now have a folio so pass it in. Also remove the test for
the private flag; it is redundant with checking folio->private for being
NULL.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/compress.c')
| -rw-r--r-- | fs/f2fs/compress.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 5847d22a5833..24c7489b7427 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -71,17 +71,15 @@ static pgoff_t start_idx_of_cluster(struct compress_ctx *cc) return cc->cluster_idx << cc->log_cluster_size; } -bool f2fs_is_compressed_page(struct page *page) +bool f2fs_is_compressed_page(struct folio *folio) { - if (!PagePrivate(page)) + if (!folio->private) return false; - if (!page_private(page)) - return false; - if (page_private_nonpointer(page)) + if (folio_test_f2fs_nonpointer(folio)) return false; - f2fs_bug_on(F2FS_P_SB(page), - *((u32 *)page_private(page)) != F2FS_COMPRESSED_PAGE_MAGIC); + f2fs_bug_on(F2FS_F_SB(folio), + *((u32 *)folio->private) != F2FS_COMPRESSED_PAGE_MAGIC); return true; } @@ -1478,7 +1476,7 @@ void f2fs_compress_write_end_io(struct bio *bio, struct folio *folio) struct f2fs_sb_info *sbi = bio->bi_private; struct compress_io_ctx *cic = folio->private; enum count_type type = WB_DATA_TYPE(folio, - f2fs_is_compressed_page(page)); + f2fs_is_compressed_page(folio)); int i; if (unlikely(bio->bi_status != BLK_STS_OK)) |
