From 83cd6a8217ee5f3462209549a15cede66a1c939d Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Fri, 3 Jun 2011 19:41:00 +0300 Subject: [PATCH] --- yaml --- r: 255091 b: refs/heads/master c: 4788b60a5faf9f9c9aec10fb7f6b36d9e0f9fa4c h: refs/heads/master i: 255089: 27092b2aac48c47e3fbd8805755eb783bc521cc5 255087: db543cd7d4d067924d81c9a4947d3be1af119a0e v: v3 --- [refs] | 2 +- trunk/drivers/mtd/ubi/vtbl.c | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index f2cd8127cf36..4b713e480622 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2a826061df67f205636b953f58f8bede2a3f009c +refs/heads/master: 4788b60a5faf9f9c9aec10fb7f6b36d9e0f9fa4c diff --git a/trunk/drivers/mtd/ubi/vtbl.c b/trunk/drivers/mtd/ubi/vtbl.c index d704ad275932..4b50a3029b84 100644 --- a/trunk/drivers/mtd/ubi/vtbl.c +++ b/trunk/drivers/mtd/ubi/vtbl.c @@ -307,8 +307,7 @@ 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); @@ -316,15 +315,6 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si, 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)) { @@ -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);