]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
UBI: initialise update marker
authorPeter Horton <zero@colonel-panic.org>
Tue, 5 Jan 2010 11:14:36 +0000 (11:14 +0000)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 12 Jan 2010 11:19:08 +0000 (13:19 +0200)
The in kernel copy of a volume's update marker is not initialised from the
volume table. This means that volumes where an update was unfinnished will
not be treated as "forbidden to use". This is basically that the update
functionality was broken.

Signed-off-by: Peter Horton <zero@colonel-panic.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable@kernel.org
drivers/mtd/ubi/vtbl.c

index 1afc61e7455dbfc1f4e78dceb4d0991e630e86b6..40044028d6824e217a6e5f5cbe9e1ea232a291f8 100644 (file)
@@ -566,6 +566,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
                vol->reserved_pebs = be32_to_cpu(vtbl[i].reserved_pebs);
                vol->alignment = be32_to_cpu(vtbl[i].alignment);
                vol->data_pad = be32_to_cpu(vtbl[i].data_pad);
+               vol->upd_marker = vtbl[i].upd_marker;
                vol->vol_type = vtbl[i].vol_type == UBI_VID_DYNAMIC ?
                                        UBI_DYNAMIC_VOLUME : UBI_STATIC_VOLUME;
                vol->name_len = be16_to_cpu(vtbl[i].name_len);