Skip to content

Commit 91401a3

Browse files
richardweinbergerdedekind
authored andcommitted
UBI: Fastmap: Calc fastmap size correctly
We need to add fm_sb too. Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Tanya Brokhman <tlinder@codeaurora.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
1 parent 443b39c commit 91401a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/mtd/ubi/fastmap.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi)
2424
{
2525
size_t size;
2626

27-
size = sizeof(struct ubi_fm_hdr) + \
27+
size = sizeof(struct ubi_fm_sb) + \
28+
sizeof(struct ubi_fm_hdr) + \
2829
sizeof(struct ubi_fm_scan_pool) + \
2930
sizeof(struct ubi_fm_scan_pool) + \
3031
(ubi->peb_count * sizeof(struct ubi_fm_ec)) + \

0 commit comments

Comments
 (0)