From: Christoph Hellwig Date: Fri, 2 Oct 2015 16:48:36 +0000 (+0200) Subject: nvme: delete dev from dev_list in nvme_reset X-Git-Tag: v4.1.12-92~126^2~234 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3c7f03244736bb3dfa2df5cd0d5fe35d274164ea;p=users%2Fjedix%2Flinux-maple.git 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 Reviewed-by: Keith Busch Signed-off-by: Jens Axboe (cherry picked from commit 201cf1ecdfe5ea2774cbb21d4214c98ec8b418de) Orabug: 22620486 Signed-off-by: Jason Luo --- diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 6c7f86fcb0f65..b8f0fcf8b1a56 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -3101,6 +3101,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; }