From: Keith Busch Date: Wed, 27 Apr 2016 21:51:18 +0000 (-0600) Subject: NVMe: Fix check_flush_dependency warning X-Git-Tag: v4.7-rc1~156^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b24774e1fb90a40836e96e39a851a774679efff;p=platform%2Fkernel%2Flinux-exynos.git NVMe: Fix check_flush_dependency warning If the controller fails and is degraded after a reset, we need to kill off all requests queues before removing the inaccessble namespaces. This will prevent del_gendisk from syncing dirty data, which we can't due from a WQ_MEM_RECLAIM work queue. Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index ff3c8d7..cc46fdf 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1887,6 +1887,7 @@ static void nvme_reset_work(struct work_struct *work) */ if (dev->online_queues < 2) { dev_warn(dev->ctrl.device, "IO queues not created\n"); + nvme_kill_queues(&dev->ctrl); nvme_remove_namespaces(&dev->ctrl); } else { nvme_start_queues(&dev->ctrl);