aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-10-25 07:26:49 -0400
committerRichard Weinberger <richard@nod.at>2015-03-26 17:46:01 -0400
commit42dd3cdcd6b5671ebedc3df76ca8dcc3473bcc67 (patch)
tree9bf61e207d8acf972db76b919a5ba8aa33034fd1 /drivers
parent8fb2a514780eee48602424a86e3cd72d3f1bdfb2 (diff)
UBI: Fastmap: Set used_ebs only for static volumes
If we set it for dynamic ones we might confuse various self checks. Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/ubi/fastmap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 5db41a5fdd7a..749e2e4738fc 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -136,14 +136,15 @@ static struct ubi_ainf_volume *add_vol(struct ubi_attach_info *ai, int vol_id,
136 if (!av) 136 if (!av)
137 goto out; 137 goto out;
138 138
139 av->highest_lnum = av->leb_count = 0; 139 av->highest_lnum = av->leb_count = av->used_ebs = 0;
140 av->vol_id = vol_id; 140 av->vol_id = vol_id;
141 av->used_ebs = used_ebs;
142 av->data_pad = data_pad; 141 av->data_pad = data_pad;
143 av->last_data_size = last_eb_bytes; 142 av->last_data_size = last_eb_bytes;
144 av->compat = 0; 143 av->compat = 0;
145 av->vol_type = vol_type; 144 av->vol_type = vol_type;
146 av->root = RB_ROOT; 145 av->root = RB_ROOT;
146 if (av->vol_type == UBI_STATIC_VOLUME)
147 av->used_ebs = used_ebs;
147 148
148 dbg_bld("found volume (ID %i)", vol_id); 149 dbg_bld("found volume (ID %i)", vol_id);
149 150