ubi: correct the calculation of fastmap size
authorZhang Yi <yi.zhang@huawei.com>
Tue, 20 Feb 2024 02:49:03 +0000 (10:49 +0800)
committerRichard Weinberger <richard@nod.at>
Sun, 25 Feb 2024 20:30:15 +0000 (21:30 +0100)
commit7f174ae4f39e8475adcc09d26c5a43394689ad6c
treec7fa104ddeefc3e76a563fb0c83c492e78d2182c
parent788cd161f99638db81b4c9ce836dbdf9a65c7701
ubi: correct the calculation of fastmap size

Now that the calculation of fastmap size in ubi_calc_fm_size() is
incorrect since it miss each user volume's ubi_fm_eba structure and the
Internal UBI volume info. Let's correct the calculation.

Cc: stable@vger.kernel.org
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/fastmap.c