erofs: avoid the potentially wrong m_plen for big pcluster
authorYue Hu <huyue2@coolpad.com>
Fri, 12 Aug 2022 06:01:50 +0000 (14:01 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 5 Sep 2022 15:22:01 +0000 (23:22 +0800)
commitea0b7b0d59e81a9c1bc03f8696bb04851bc2ad22
tree79b087a88ddd3ddf0d6d5de640640f2eb4fcdcff
parent5bd9628b784cc5e38e1c7ebb680bbd6ee741230e
erofs: avoid the potentially wrong m_plen for big pcluster

Actually, 'compressedlcs' stores compressed block count rather than
lcluster count. Therefore, the number of bits for shifting the count
should be 'LOG_BLOCK_SIZE' rather than 'lclusterbits' although current
lcluster size is 4K.

The value of 'm_plen' will be wrong once we enable the non 4K-sized
lcluster.

Signed-off-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20220812060150.8510-1-huyue2@coolpad.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/zmap.c