summaryrefslogtreecommitdiff
path: root/drivers/staging/erofs
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2018-08-21 22:49:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-27 19:46:13 +0200
commitd6421a46af70ce8d74f27ee1a099a23b4c90e691 (patch)
tree70413fb758c89327849823609eb29803edee458e /drivers/staging/erofs
parent390c642e1264f3deb5c4b4394b41479221a57542 (diff)
staging: erofs: fix compression mapping beyond EOF
Logical address of EOF LTP mapping should start at `inode->i_size' rather than `inode->i_size - 1' to `m_la(in)', fix it. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/erofs')
-rw-r--r--drivers/staging/erofs/unzip_vle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index dab892157e51..6c4c9280cb8c 100644
--- a/drivers/staging/erofs/unzip_vle.c
+++ b/drivers/staging/erofs/unzip_vle.c
@@ -1548,7 +1548,7 @@ int z_erofs_map_blocks_iter(struct inode *inode,
if (unlikely(map->m_la >= inode->i_size)) {
BUG_ON(!initial);
map->m_llen = map->m_la + 1 - inode->i_size;
- map->m_la = inode->i_size - 1;
+ map->m_la = inode->i_size;
map->m_flags = 0;
goto out;
}