Offtopic: ubifs and best practice for supporting browser based firmware upgrades

Artem Bityutskiy dedekind1 at gmail.com
Wed Sep 26 07:13:23 EDT 2012


From df2a498002498e52025acf51e0b43064d766aa0a Mon Sep 17 00:00:00 2001
From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Date: Wed, 26 Sep 2012 14:12:28 +0300
Subject: [PATCH] UBI: allow for delayed rename

Just an experimental patch.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 drivers/mtd/ubi/vmt.c |   19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 9169e58..6d7bcd9 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -597,25 +597,6 @@ int ubi_rename_volumes(struct ubi_device *ubi, struct list_head *rename_list)
 	struct ubi_rename_entry *re;
 
 	err = ubi_vtbl_rename_volumes(ubi, rename_list);
-	if (err)
-		return err;
-
-	list_for_each_entry(re, rename_list, list) {
-		if (re->remove) {
-			err = ubi_remove_volume(re->desc, 1);
-			if (err)
-				break;
-		} else {
-			struct ubi_volume *vol = re->desc->vol;
-
-			spin_lock(&ubi->volumes_lock);
-			vol->name_len = re->new_name_len;
-			memcpy(vol->name, re->new_name, re->new_name_len + 1);
-			spin_unlock(&ubi->volumes_lock);
-			ubi_volume_notify(ubi, vol, UBI_VOLUME_RENAMED);
-		}
-	}
-
 	if (!err)
 		self_check_volumes(ubi);
 	return err;
-- 
1.7.10.4


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120926/669ac9e4/attachment.sig>


More information about the linux-mtd mailing list