1
0
Fork 0

lightnvm: cleanup queue before target removal

This prevents outstanding IOs to be sent for completion to target after
the target has been removed. The flow is now: stop new IOs > cleanup
queue > remove target.

Signed-off-by: Javier Gonzalez <javier@cnexlabs.com>
Signed-off-by: Matias Bjørling <m@bjorling.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
hifive-unleashed-5.1
Javier González 2015-11-16 15:34:47 +01:00 committed by Jens Axboe
parent dad1b00977
commit d09f9581b2
1 changed files with 2 additions and 2 deletions

View File

@ -460,11 +460,11 @@ static void nvm_remove_target(struct nvm_target *t)
lockdep_assert_held(&nvm_lock);
del_gendisk(tdisk);
blk_cleanup_queue(q);
if (tt->exit)
tt->exit(tdisk->private_data);
blk_cleanup_queue(q);
put_disk(tdisk);
list_del(&t->list);