aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2015-03-23 11:32:37 -0400
committerJens Axboe <axboe@fb.com>2015-03-23 11:35:12 -0400
commite6e96d73a2aaaa54ed2c0f98693f4bf572712f1c (patch)
tree526482a66208a6bec674884a0b57800f298f55b8
parent7ee8e4f3983c4ff700958a6099c8fd212ea67b94 (diff)
NVMe: Initialize device list head before starting
Driver recovery requires the device's list node to have been initialized. Fixes: https://lkml.org/lkml/2015/3/22/262 Reported-by: Steven Noonan <steven@uplinklabs.net> Signed-off-by: Keith Busch <keith.busch@intel.com> Cc: Matthew Wilcox <willy@linux.intel.com> Cc: Jens Axboe <axboe@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/block/nvme-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index ceb32dd52a6c..e23be20a3417 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -3003,6 +3003,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
3003 } 3003 }
3004 get_device(dev->device); 3004 get_device(dev->device);
3005 3005
3006 INIT_LIST_HEAD(&dev->node);
3006 INIT_WORK(&dev->probe_work, nvme_async_probe); 3007 INIT_WORK(&dev->probe_work, nvme_async_probe);
3007 schedule_work(&dev->probe_work); 3008 schedule_work(&dev->probe_work);
3008 return 0; 3009 return 0;