]> git.baikalelectronics.ru Git - kernel.git/commit
lightnvm: double-clear of dev->lun_map on target init error
authorJavier González <jg@lightnvm.io>
Sat, 15 Apr 2017 18:55:42 +0000 (20:55 +0200)
committerJens Axboe <axboe@fb.com>
Sun, 16 Apr 2017 16:06:25 +0000 (10:06 -0600)
commitd4e018d4b45fec5459ca7ccd738108f7ffbc4f4b
treee899f7abec10a0cffd5e89883411360efcab8a4f
parent7846fa487ac300c8b64a38a601a4244c5a6397d4
lightnvm: double-clear of dev->lun_map on target init error

The dev->lun_map bits are cleared twice if an target init error occurs.
First in the target clean routine, and then next in the nvm_tgt_create
error function. Make sure that it is only cleared once by extending
nvm_remove_tgt_devi() with a clear bit, such that clearing of bits can
ignored when cleaning up a successful initialized target.

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