Skip to content

Commit

Permalink
nvme: delete dev from dev_list in nvme_reset
Browse files Browse the repository at this point in the history
Device resets need to delete the device from the device list before
kicking of the reset an re-probe, otherwise we get the device added
to the list twice.  nvme_reset is the only side missing this deletion
at the moment, and this patch adds it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Oct 9, 2015
1 parent 0a7385a commit 201cf1e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/block/nvme-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3089,6 +3089,7 @@ static int nvme_reset(struct nvme_dev *dev)

spin_lock(&dev_list_lock);
if (!work_pending(&dev->reset_work)) {
list_del_init(&dev->node);
queue_work(nvme_workq, &dev->reset_work);
ret = 0;
}
Expand Down

0 comments on commit 201cf1e

Please sign in to comment.