提交 84a92580 编写于 作者: A Artem Bityutskiy

UBI: fix bug in atomic_leb_change()

atomic_leb_change() is only allowed for dynamic volumes, so set
the volume type correctly.
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 a6ded48e
......@@ -861,7 +861,7 @@ int ubi_eba_atomic_leb_change(struct ubi_device *ubi, int vol_id, int lnum,
vid_hdr->data_pad = cpu_to_be32(vol->data_pad);
crc = crc32(UBI_CRC32_INIT, buf, len);
vid_hdr->vol_type = UBI_VID_STATIC;
vid_hdr->vol_type = UBI_VID_DYNAMIC;
vid_hdr->data_size = cpu_to_be32(len);
vid_hdr->copy_flag = 1;
vid_hdr->data_crc = cpu_to_be32(crc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册