[PATCH 4/6] UBI: Fastmap: Locking updates

2014-11-30 Thread Richard Weinberger
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

[PATCH 4/6] UBI: Fastmap: Locking updates

2014-11-30 Thread Richard Weinberger
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