NVMe: Add the nvme thread to the wait queue before waking it up
authorMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 20 May 2011 13:34:43 +0000 (09:34 -0400)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Fri, 4 Nov 2011 19:53:03 +0000 (15:53 -0400)
commiteac623ba7a91474a688eb5d0fcd0eaa6a56dc41c
tree59a355c616c3f8b717e73aac01af2f9e3ffdc60c
parent6f0f54499f2edf7e25410cdd99e6f030f3485fd1
NVMe: Add the nvme thread to the wait queue before waking it up

If the I/O was not completed by a single NVMe command, we add the
bio to the congestion list and wake up the kthread to resubmit it.
But the kthread calls remove_wait_queue() unconditionally, which
will oops if it's not on the wait queue.  So add the kthread to
the wait queue before waking it up.

Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
drivers/block/nvme.c