mtd: ubi: Fix endless loop when moving PEB
When moving a PEB the leb_write_trylock() function is called.
As the function never returns 0 UBI will end up in an endless
loop.

Noticed the issue when fastmap has been enabled and data is beeing copied
several times to a UBI volume. When UBI tries to move the anchor PEB,
the issue comes up.

The leb_write_trylock() is now equal to the leb_write_lock().
But kept it for easier maintaince in future when syncing with
kernel.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 1ebb663 commit 8b765bebb6aecb363031838d394e360bf11bb009
@Teresa Remmet Teresa Remmet authored on 22 Jun 2016
Sascha Hauer committed on 28 Jun 2016
Showing 1 changed file
View
drivers/mtd/ubi/eba.c