/* ubi_update_layout_vol - helper for updatting layout volumes on flash @ubi: UBI device description object  */
static int ubi_update_layout_vol(struct ubi_device *ubi)
/* ubi_update_layout_vol - helper for updatting layout volumes on flash @ubi: UBI device description object  */
static int ubi_update_layout_vol(struct ubi_device *ubi)
{
	struct ubi_volume *layout_vol;
	int i, err;
	layout_vol = ubi->volumes[vol_id2idx(ubi, UBI_LAYOUT_VOLUME_ID)];
	for (i = 0; i < UBI_LAYOUT_VOLUME_EBS; i++) {
		err = ubi_eba_atomic_leb_change(ubi, layout_vol, i, ubi->vtbl,
						ubi->vtbl_size);
		if (err)
			return err;
	}
	return 0;
}