UBI: simplify PEB protection code
authorXiaochuan-Xu <xiaochuan-xu@cqu.edu.cn>
Mon, 15 Dec 2008 13:07:41 +0000 (21:07 +0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 17 Jul 2009 13:04:12 +0000 (16:04 +0300)
commit7ff0473f071dce5dc3969ec332efcdeb0d3afd40
treedb8c72dcde4f73304ae68cab3a1fd015ba62f813
parent563100bd1390b24f8fd03d9e1bbe20e93e1d65b3
UBI: simplify PEB protection code

UBI has 2 RB-trees to implement PEB protection, which is too
much for simply prevent PEB from being moved for some time.
This patch implements this using lists. The benefits:

1. No need to allocate protection entry on each PEB get.
2. No need to maintain balanced trees and walk them.

Signed-off-by: Xiaochuan-Xu <xiaochuan-xu@cqu.edu.cn>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/wl.c