]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: remove nested lock conflict with mm
authorMatias Bjørling <m@bjorling.me>
Thu, 7 Jul 2016 07:54:17 +0000 (09:54 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 7 Jul 2016 14:51:52 +0000 (08:51 -0600)
commit9e03d6575946c14ec6c84e8ccd234e537534d7a8
tree23cf4e800cba9be0351780bb82824713ade3dc82
parent8c1d6db1fac5eec068e5e468737fc103b338e12e
lightnvm: remove nested lock conflict with mm

If a media manager tries to initialize it targets upon media manager
initialization, the media manager will need to know which target types
are available in LightNVM. The lists of which managers and target types
are available shares the same lock.

Therefore, on initialization, the nvm_lock is taken by LightNVM core,
which later leads to a deadlock when target types are enumerated by the
media manager.

Add an exclusive lock for target types to resolve this conflict.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/core.c