erofs: avoid using generic_block_bmap
authorHuang Jianan <huangjianan@oppo.com>
Wed, 9 Dec 2020 11:57:40 +0000 (19:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:46 +0000 (11:53 +0100)
commita60cb39186fb4dbf3d505fb9d5e9322cb7465b3d
tree46015a77b7d1b8fb3ff6eda6cffa3ee45d0d34c6
parent82d87b59df4c1d7eba71829d9da3f14e71295be6
erofs: avoid using generic_block_bmap

[ Upstream commit d8b3df8b1048405e73558b88cba2adf29490d468 ]

Surprisingly, `block' in sector_t indicates the number of
i_blkbits-sized blocks rather than sectors for bmap.

In addition, considering buffer_head limits mapped size to 32-bits,
should avoid using generic_block_bmap.

Link: https://lore.kernel.org/r/20201209115740.18802-1-huangjianan@oppo.com
Fixes: 9da681e017a3 ("staging: erofs: support bmap")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Huang Jianan <huangjianan@oppo.com>
Signed-off-by: Guo Weichao <guoweichao@oppo.com>
[ Gao Xiang: slightly update the commit message description. ]
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/erofs/data.c