File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -801,19 +801,18 @@ void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task)
801801 * page being waited on in the cluster, and if so, it decompresses the cluster
802802 * (or in the case of a failure, cleans up without actually decompressing).
803803 */
804- void f2fs_end_read_compressed_page (struct page * page , bool failed ,
804+ void f2fs_end_read_compressed_page (struct folio * folio , bool failed ,
805805 block_t blkaddr , bool in_task )
806806{
807- struct decompress_io_ctx * dic =
808- (struct decompress_io_ctx * )page_private (page );
807+ struct decompress_io_ctx * dic = folio -> private ;
809808 struct f2fs_sb_info * sbi = dic -> sbi ;
810809
811810 dec_page_count (sbi , F2FS_RD_DATA );
812811
813812 if (failed )
814813 WRITE_ONCE (dic -> failed , true);
815814 else if (blkaddr && in_task )
816- f2fs_cache_compressed_page (sbi , page ,
815+ f2fs_cache_compressed_page (sbi , & folio -> page ,
817816 dic -> inode -> i_ino , blkaddr );
818817
819818 if (atomic_dec_and_test (& dic -> remaining_pages ))
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ static void f2fs_finish_read_bio(struct bio *bio, bool in_task)
144144
145145 if (f2fs_is_compressed_page (& folio -> page )) {
146146 if (ctx && !ctx -> decompression_attempted )
147- f2fs_end_read_compressed_page (& folio -> page , true, 0 ,
147+ f2fs_end_read_compressed_page (folio , true, 0 ,
148148 in_task );
149149 f2fs_put_folio_dic (folio , in_task );
150150 continue ;
@@ -241,7 +241,7 @@ static void f2fs_handle_step_decompress(struct bio_post_read_ctx *ctx,
241241 struct folio * folio = fi .folio ;
242242
243243 if (f2fs_is_compressed_page (& folio -> page ))
244- f2fs_end_read_compressed_page (& folio -> page , false, blkaddr ,
244+ f2fs_end_read_compressed_page (folio , false, blkaddr ,
245245 in_task );
246246 else
247247 all_compressed = false;
Original file line number Diff line number Diff line change @@ -4487,7 +4487,7 @@ bool f2fs_is_compress_level_valid(int alg, int lvl);
44874487int __init f2fs_init_compress_mempool (void );
44884488void f2fs_destroy_compress_mempool (void );
44894489void f2fs_decompress_cluster (struct decompress_io_ctx * dic , bool in_task );
4490- void f2fs_end_read_compressed_page (struct page * page , bool failed ,
4490+ void f2fs_end_read_compressed_page (struct folio * folio , bool failed ,
44914491 block_t blkaddr , bool in_task );
44924492bool f2fs_cluster_is_empty (struct compress_ctx * cc );
44934493bool 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; }
45614561static inline void f2fs_destroy_compress_mempool (void ) { }
45624562static inline void f2fs_decompress_cluster (struct decompress_io_ctx * dic ,
45634563 bool in_task ) { }
4564- static inline void f2fs_end_read_compressed_page (struct page * page ,
4564+ static inline void f2fs_end_read_compressed_page (struct folio * folio ,
45654565 bool failed , block_t blkaddr , bool in_task )
45664566{
45674567 WARN_ON_ONCE (1 );
You can’t perform that action at this time.
0 commit comments