]> git.baikalelectronics.ru Git - kernel.git/commit
UBI: correct ubi_wl_flush locking
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 7 Jun 2012 12:15:30 +0000 (15:15 +0300)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 7 Jun 2012 12:22:21 +0000 (15:22 +0300)
commitf8b15e2453f8448c28b993a6360c9ae761c2b6ba
tree19b7b41b12f4c1eb0a0efdbd494c58e2381e1dd9
parenta9c638450decf5139eec12d935dda9aaf6c3f14a
UBI: correct ubi_wl_flush locking

Commit "75ef3935 UBI: modify ubi_wl_flush function to clear work queue for a lnum"
takes the 'work_sem' semaphore in write mode for the entire loop, which is not
very good because it will block other workers for potentially long time. We do
not need to have it in write mode - read mode is enough, and we do not need to
hole it over the entire loop. So this patch turns changes the locking: takes
'work_sem' in read mode and pushes it down to the loop.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/ubi/wl.c