]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit2d78aee426d821bbecbc80ee96ada5730ee68b6f
tree3ec086d07295b69654ba957d47ec723cd3a044c1
parentf036dfeb859cb412fdbe8e3ee74b632d9ce6387e
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