summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-12-11 20:58:39 (GMT)
committerJens Axboe <axboe@fb.com>2014-12-11 20:58:39 (GMT)
commitfe54303ee2be293c1c5c7a53a152453789cabc2f (patch)
tree359ec0be601521afe7cde6dcbd47e6a66e1364a2 /lib
parent285dffc9101244ac65c29672a1fb3fe614b52238 (diff)
downloadlinux-fe54303ee2be293c1c5c7a53a152453789cabc2f.tar.xz
NVMe: fix retry/error logic in nvme_queue_rq()
The logic around retrying and erroring IO in nvme_queue_rq() is broken in a few ways: - If we fail allocating dma memory for a discard, we return retry. We have the 'iod' stored in ->special, but we free the 'iod'. - For a normal request, if we fail dma mapping of setting up prps, we have the same iod situation. Additionally, we haven't set the callback for the request yet, so we also potentially leak IOMMU resources. Get rid of the ->special 'iod' store. The retry is uncommon enough that it's not worth optimizing for or holding on to resources to attempt to speed it up. Additionally, it's usually best practice to free any request related resources when doing retries. Acked-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions