Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255091
b: refs/heads/master
c: 4788b60
h: refs/heads/master
i:
  255089: 27092b2
  255087: db543cd
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Jun 7, 2011
1 parent 946701e commit 83cd6a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a826061df67f205636b953f58f8bede2a3f009c
refs/heads/master: 4788b60a5faf9f9c9aec10fb7f6b36d9e0f9fa4c
16 changes: 3 additions & 13 deletions trunk/drivers/mtd/ubi/vtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,24 +307,14 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
{
int err, tries = 0;
static struct ubi_vid_hdr *vid_hdr;
struct ubi_scan_volume *sv;
struct ubi_scan_leb *new_seb, *old_seb = NULL;
struct ubi_scan_leb *new_seb;

ubi_msg("create volume table (copy #%d)", copy + 1);

vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_KERNEL);
if (!vid_hdr)
return -ENOMEM;

/*
* Check if there is a logical eraseblock which would have to contain
* this volume table copy was found during scanning. It has to be wiped
* out.
*/
sv = ubi_scan_find_sv(si, UBI_LAYOUT_VOLUME_ID);
if (sv)
old_seb = ubi_scan_find_seb(sv, copy);

retry:
new_seb = ubi_scan_get_free_peb(ubi, si);
if (IS_ERR(new_seb)) {
Expand All @@ -351,8 +341,8 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
goto write_error;

/*
* And add it to the scanning information. Don't delete the old
* @old_seb as it will be deleted and freed in 'ubi_scan_add_used()'.
* And add it to the scanning information. Don't delete the old version
* of this LEB as it will be deleted and freed in 'ubi_scan_add_used()'.
*/
err = ubi_scan_add_used(ubi, si, new_seb->pnum, new_seb->ec,
vid_hdr, 0);
Expand Down

0 comments on commit 83cd6a8

Please sign in to comment.