Skip to content

Commit

Permalink
UBI: fix bug in atomic_leb_change()
Browse files Browse the repository at this point in the history
atomic_leb_change() is only allowed for dynamic volumes, so set
the volume type correctly.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jul 18, 2007
1 parent a6ded48 commit 84a9258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/eba.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 84a9258

Please sign in to comment.