lightnvm: remove mgt targets on mgt removal

Targets associated with a device manager are not freed on device
removal. They have to be manually removed before shutdown. Make sure
any outstanding targets are freed upon shutdown.

Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Matias Bjørling 2016-05-06 20:03:17 +02:00 committed by Jens Axboe
parent 45bbd0529e
commit 976bdfcae3
2 changed files with 44 additions and 26 deletions

View file

@ -200,6 +200,7 @@ struct nvm_id {
struct nvm_target {
struct list_head list;
struct nvm_dev *dev;
struct nvm_tgt_type *type;
struct gendisk *disk;
};