diff options
author | Christoph Hellwig <hch@lst.de> | 2015-10-02 18:48:36 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-10-09 10:40:36 -0600 |
commit | 201cf1ecdfe5ea2774cbb21d4214c98ec8b418de (patch) | |
tree | 99d0fc83686b451bc983ae1f4f4c90b5dc0a01aa /drivers | |
parent | 0a7385ad69f0f210c5cfbfd334b42423a6e05e5a (diff) | |
download | linux-201cf1ecdfe5ea2774cbb21d4214c98ec8b418de.tar.bz2 |
nvme: delete dev from dev_list in nvme_reset
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/nvme-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index bf35846558c8..be35b1d18854 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -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; } |