Skip to content

Commit

Permalink
UBI: Fastmap: Calc fastmap size correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Weinberger authored and Artem Bityutskiy committed Oct 3, 2014
1 parent 443b39c commit 91401a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mtd/ubi/fastmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi)
{
size_t size;

size = sizeof(struct ubi_fm_hdr) + \
size = sizeof(struct ubi_fm_sb) + \
sizeof(struct ubi_fm_hdr) + \
sizeof(struct ubi_fm_scan_pool) + \
sizeof(struct ubi_fm_scan_pool) + \
(ubi->peb_count * sizeof(struct ubi_fm_ec)) + \
Expand Down

0 comments on commit 91401a3

Please sign in to comment.