Skip to content

Commit

Permalink
lightnvm: cleanup queue before target removal
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Javier González authored and Jens Axboe committed Nov 16, 2015
1 parent dad1b00 commit d09f958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/lightnvm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d09f958

Please sign in to comment.