diff options
author | Keith Busch <keith.busch@intel.com> | 2015-06-18 13:36:40 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-06-27 11:42:54 -0600 |
commit | 3399a3f7464a624db1b365dbce0fef0ef4636c05 (patch) | |
tree | 33d1342c9d2639948baeb9cabb22009e6a663612 /drivers/block | |
parent | de3eff2bad56f0a29d3915105223d368f2bbc94e (diff) | |
download | op-kernel-dev-3399a3f7464a624db1b365dbce0fef0ef4636c05.zip op-kernel-dev-3399a3f7464a624db1b365dbce0fef0ef4636c05.tar.gz |
NVMe: Fix filesystem deadlock on removal
Move gendisk deletion before controller shutdown so filesystem may sync
dirty pages. Before, this would deadlock trying to allocate requests
on frozen queues that are about to be deleted.
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 22761a6..75a9149 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c @@ -3124,8 +3124,8 @@ static void nvme_remove(struct pci_dev *pdev) flush_work(&dev->reset_work); flush_work(&dev->scan_work); device_remove_file(dev->device, &dev_attr_reset_controller); - nvme_dev_shutdown(dev); nvme_dev_remove(dev); + nvme_dev_shutdown(dev); nvme_dev_remove_admin(dev); device_destroy(nvme_class, MKDEV(nvme_char_major, dev->instance)); nvme_free_queues(dev, 0); |