]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: erofs: fix i_blocks calculation
authorGao Xiang <gaoxiang25@huawei.com>
Tue, 28 May 2019 03:19:43 +0000 (11:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2019 20:59:10 +0000 (13:59 -0700)
commitfe6d98750cf04597af36cbd775eede4afe0d3730
tree92f62c437679e41d9568a0bebb82849101fb92af
parent89f27eded5b63c697287050d9ef5c713cde0af98
staging: erofs: fix i_blocks calculation

For compressed files, i_blocks should not be calculated
by using i_size. use i_u.compressed_blocks instead.

In addition, i_blocks was miscalculated for non-compressed
files previously, fix it as well.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/erofs/inode.c