UBI: Fastmap: Locking updates
authorRichard Weinberger <richard@nod.at>
Mon, 10 Nov 2014 15:28:08 +0000 (16:28 +0100)
committerRichard Weinberger <richard@nod.at>
Thu, 26 Mar 2015 21:46:02 +0000 (22:46 +0100)
commit111ab0b26fc1bfad575d1e376e146d194d261e22
tree451a0a31b6f28d85986569010fa8c3381eb1d622
parent42dd3cdcd6b5671ebedc3df76ca8dcc3473bcc67
UBI: Fastmap: Locking updates

a) Rename ubi->fm_sem to ubi->fm_eba_sem as this semaphore
protects EBA changes.
b) Turn ubi->fm_mutex into a rw semaphore. It will still serialize
fastmap writes but also ensures that ubi_wl_put_peb() is not
interrupted by a fastmap write. We use a rw semaphore to allow
ubi_wl_put_peb() still to be executed in parallel if no fastmap
write is happening.

Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/eba.c
drivers/mtd/ubi/fastmap.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/wl.c