lkml.org 
[lkml]   [2018]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 8/8] staging: erofs: fix compression mapping beyond EOF
    Date
    From: Gao Xiang <gaoxiang25@huawei.com>

    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>
    ---
    drivers/staging/erofs/unzip_vle.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
    index 6c5b0a312592..2f47498eb1fe 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;
    }
    --
    2.18.0
    \
     
     \ /
      Last update: 2018-08-12 16:03    [W:4.182 / U:0.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site