UBI: harmonize the update of ubi->beb_rsvd_pebs
authorShmulik Ladkani <shmulik.ladkani@gmail.com>
Wed, 4 Jul 2012 08:06:04 +0000 (11:06 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Wed, 18 Jul 2012 11:30:34 +0000 (14:30 +0300)
commit87e773c95eb0b363f2efcc7aff8a347dc18925d0
tree76e802802a29567559f4d12d9c4d0ac8cdd63cfb
parent5c669a5bd8c0f0567127128990d01f9ae320a9ef
UBI: harmonize the update of ubi->beb_rsvd_pebs

Currently, there are several locations where an attempt to reserve more
PEBs for bad PEB handling is made, with the same code being duplicated.

Harmonize it by introducing 'ubi_update_reserved()'.

Also, improve the debug message issued, making it more descriptive.

Artem: amended the patch a little.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
drivers/mtd/ubi/misc.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/vmt.c