mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
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>
This commit is contained in:
parent
a9249a2671
commit
587b2df524
|
|
@ -801,11 +801,10 @@ void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task)
|
|||
* 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))
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user