lightnvm: pblk: fix race condition on line retry
authorJavier González <jg@lightnvm.io>
Fri, 21 Apr 2017 23:32:45 +0000 (01:32 +0200)
committerJens Axboe <axboe@fb.com>
Sun, 23 Apr 2017 22:57:52 +0000 (16:57 -0600)
commit3dc001f343659e4732b4ff6da1c28edbd56c6e15
tree5d541173911c6ab32b812541aff08beeae5853fa
parent2859323e35ab5fc42f351fbda23ab544eaa85945
lightnvm: pblk: fix race condition on line retry

When a pblk line fails (or is recovered), make sure to take the line
management lock.

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Matias Bjørling <matias@cnexlabs.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/lightnvm/pblk-core.c