UBI: bugfix in error path
When volume creation fails, we have to set ubi->volumes[vol_id] back to NULL. This patch also tweaks some debugging stuff. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
@@ -96,9 +96,6 @@ int ubi_change_vtbl_record(struct ubi_device *ubi, int idx,
|
||||
vtbl_rec->crc = cpu_to_be32(crc);
|
||||
}
|
||||
|
||||
dbg_msg("change record %d", idx);
|
||||
ubi_dbg_dump_vtbl_record(vtbl_rec, idx);
|
||||
|
||||
mutex_lock(&ubi->vtbl_mutex);
|
||||
memcpy(&ubi->vtbl[idx], vtbl_rec, sizeof(struct ubi_vtbl_record));
|
||||
for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) {
|
||||
|
Reference in New Issue
Block a user