]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: tighten up state check for namespace scanning
authorChristoph Hellwig <hch@lst.de>
Tue, 26 Apr 2016 11:51:58 +0000 (13:51 +0200)
committerJens Axboe <axboe@fb.com>
Mon, 2 May 2016 15:09:23 +0000 (09:09 -0600)
commitd40075be07a3a1972433979045fe47adc95538cd
tree57a8e413100b35efae3fe64fcf1a752c9d36776c
parentf274f6eaccb11d7c4f8c3bf27589fb10b667ec1a
nvme: tighten up state check for namespace scanning

We only should be scanning namespaces if the controller is live.  Currently
we call the function just before setting it live, so fix the code up to
move the call to nvme_queue_scan to just below the state change.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by Jon Derrick: <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/pci.c