summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2023-12-14 19:13:37 +0300
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-12-18 10:49:07 +0300
commite5aba911dee5e20fa82efbe13e0af8f38ea459e7 (patch)
treee5ea59f4dd395970d27e8f9f48f4919b43f45060 /fs/erofs
parent8d2517aaeea3ab8651bb517bca8f3c8664d318ea (diff)
downloadlinux-e5aba911dee5e20fa82efbe13e0af8f38ea459e7.tar.xz
erofs: fix ztailpacking for subpage compressed blocks
`pageofs_in` should be the compressed data offset of the page rather than of the block. Acked-by: Chao Yu <chao@kernel.org> Reviewed-by: Yue Hu <huyue2@coolpad.com> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20231214161337.753049-1-hsiangkao@linux.alibaba.com
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/zdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index d02989466711..5d5640173412 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -810,7 +810,6 @@ static int z_erofs_register_pcluster(struct z_erofs_decompress_frontend *fe)
if (ztailpacking) {
pcl->obj.index = 0; /* which indicates ztailpacking */
- pcl->pageofs_in = erofs_blkoff(fe->inode->i_sb, map->m_pa);
} else {
pcl->obj.index = erofs_blknr(sb, map->m_pa);
@@ -887,6 +886,7 @@ static int z_erofs_pcluster_begin(struct z_erofs_decompress_frontend *fe)
}
get_page(map->buf.page);
WRITE_ONCE(fe->pcl->compressed_bvecs[0].page, map->buf.page);
+ fe->pcl->pageofs_in = map->m_pa & ~PAGE_MASK;
fe->mode = Z_EROFS_PCLUSTER_FOLLOWED_NOINPLACE;
}
/* file-backed inplace I/O pages are traversed in reverse order */