From a37bea1eb3ef8f88eb92cfbbaca49b6f13f46d1b Mon Sep 17 00:00:00 2001 From: Jan Altenberg Date: Fri, 28 Mar 2008 16:13:53 +0100 Subject: [PATCH] --- yaml --- r: 93065 b: refs/heads/master c: cbd8a9d2cd6f576ca41022599341bbd8be1b0b27 h: refs/heads/master i: 93063: 491e555111eed14de0b03e80a40371b842725bd7 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/ubi/gluebi.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 98338d7b3d23..d5d5f041ae18 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e0c84e37e809e79313043385148020ceb760496 +refs/heads/master: cbd8a9d2cd6f576ca41022599341bbd8be1b0b27 diff --git a/trunk/drivers/mtd/ubi/gluebi.c b/trunk/drivers/mtd/ubi/gluebi.c index d397219238d3..e909b390069a 100644 --- a/trunk/drivers/mtd/ubi/gluebi.c +++ b/trunk/drivers/mtd/ubi/gluebi.c @@ -291,11 +291,12 @@ int ubi_create_gluebi(struct ubi_device *ubi, struct ubi_volume *vol) /* * In case of dynamic volume, MTD device size is just volume size. In * case of a static volume the size is equivalent to the amount of data - * bytes, which is zero at this moment and will be changed after volume - * update. + * bytes. */ if (vol->vol_type == UBI_DYNAMIC_VOLUME) mtd->size = vol->usable_leb_size * vol->reserved_pebs; + else + mtd->size = vol->used_bytes; if (add_mtd_device(mtd)) { ubi_err("cannot not add MTD device\n");