]> git.baikalelectronics.ru Git - kernel.git/commit
UBI: simplify LEB write and atomic LEB change code
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 16 Sep 2016 14:59:21 +0000 (16:59 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 2 Oct 2016 20:48:14 +0000 (22:48 +0200)
commit79f0e47d4a6092edc215918b6d29df0f074b9add
tree3ec086d07295b69654ba957d47ec723cd3a044c1
parent724cb5670985efbf86ae12a42be77a5ac3e1afb7
UBI: simplify LEB write and atomic LEB change code

ubi_eba_write_leb(), ubi_eba_write_leb_st() and
ubi_eba_atomic_leb_change() are using a convoluted retry/exit path.
Add the try_write_vid_and_data() function to simplify the retry logic
and make sure we have a single exit path instead of manually releasing
the resources in each error path.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/eba.c