]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commitedee1bdd66bf0fda46a176bc3ee5c992dbbc466e
treee899f7abec10a0cffd5e89883411360efcab8a4f
parentb0e0306ce14180baee00cea9be5600eef6750af8
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