Turned back the remmaped sector address to the address in the partition,
when ending io, for compress cache to work properly.
Fixes: 6ce19aff0b8c ("f2fs: compress: add compress_inode to cache
compressed blocks")
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Youngjin Gil <youngjin.gil@samsung.com>
Signed-off-by: Hyeong Jun Kim <hj514.kim@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
        struct f2fs_sb_info *sbi;
        struct work_struct work;
        unsigned int enabled_steps;
+       block_t fs_blkaddr;
 };
 
 static void f2fs_finish_read_bio(struct bio *bio)
        struct bio_vec *bv;
        struct bvec_iter_all iter_all;
        bool all_compressed = true;
-       block_t blkaddr = SECTOR_TO_BLOCK(ctx->bio->bi_iter.bi_sector);
+       block_t blkaddr = ctx->fs_blkaddr;
 
        bio_for_each_segment_all(bv, ctx->bio, iter_all) {
                struct page *page = bv->bv_page;
                ctx->bio = bio;
                ctx->sbi = sbi;
                ctx->enabled_steps = post_read_steps;
+               ctx->fs_blkaddr = blkaddr;
                bio->bi_private = ctx;
        }