]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvme: delete dev from dev_list in nvme_reset
authorChristoph Hellwig <hch@lst.de>
Fri, 2 Oct 2015 16:48:36 +0000 (18:48 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:31:58 +0000 (16:31 -0700)
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>
(cherry picked from commit 201cf1ecdfe5ea2774cbb21d4214c98ec8b418de)

Orabug: 22620486
Signed-off-by: Jason Luo <zhangqing.luo@oracle.com>
drivers/block/nvme-core.c

index 6c7f86fcb0f6558e450e5fa0a4c39bdc8be0f9ea..b8f0fcf8b1a568742a019af82a27f87322c0d064 100644 (file)
@@ -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;
        }