nvme fixes for Linux 6.3
- fix and cleanup freeing single sgl (Keith Busch) -----BEGIN PGP SIGNATURE----- iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmPtIWkLHGhjaEBsc3Qu ZGUACgkQD55TZVIEUYPHkxAAwmN7NlGsISPwH3b/20h1taQ60Y2yXXSMZwvcTp/l mBPpHSl5yuconMa7UfsA4eqhpXepUh+VOjY88NrH4sr3ECkxjEESfqJBGOmB+YSD +uKnNPgEqm2g8YpLlyGvOBw9fqtYOc7PTsczkT98l+r7STz76+qpKdEQLQvnXYQQ 6x6J9yQ50eVXHmVWCFmHNlENStdG9NnZInsHEN5Ygy0klBREXJxPmwv60Nx1q9ep sD8o+y3yDWHYVBxIhjtJ9tMrpdPohpPLL4IZYBTaEYPLbUBJY/Swdbb3yPv4FMUu wWkpxxA00+HHrChIsGa063VzS9nYATvF9QigMxFb8r2VKam7ZM68mxdyYQ4Pq9j1 5MyImVMGGApiZswjGgKP0zV+9OI3eAsI82+k3aBWzVnAoIDZAB0Fu90anMoPVjk+ XBVhFlH69lcPd3M4259/fbdIsntL8S6BWIAQI6PX5Lulfn8wqmQxo6OZ3cYokl+y zs3MwIz/ajF9QTmIRHhKV9WFWYlvy80x2Yw1Wn7p1kSCnrfFkjiOrFbfzHGTV40R ap+Ip2Pzl2N9sreBXJ826N5FtI5l4p5/mrEG+zZgBtq/5XlMwjBEm3jiG7X7x5nL uYuFIKIDxr9THswjpcliVTJ4lmSNx6qKEnAFKYX1HUa6DZUyq5BUaU3ssUCoedg9 0/k= =cGCH -----END PGP SIGNATURE----- Merge tag 'nvme-6.3-2023-02-15' of git://git.infradead.org/nvme into for-6.3/block Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.3 - fix and cleanup freeing single sgl (Keith Busch)" * tag 'nvme-6.3-2023-02-15' of git://git.infradead.org/nvme: nvme-pci: remove iod use_sgls nvme-pci: fix freeing single sgl
This commit is contained in:
commit
d2ad8f0c89
@ -230,7 +230,6 @@ union nvme_descriptor {
|
||||
struct nvme_iod {
|
||||
struct nvme_request req;
|
||||
struct nvme_command cmd;
|
||||
bool use_sgl;
|
||||
bool aborted;
|
||||
s8 nr_allocations; /* PRP list pool allocations. 0 means small
|
||||
pool in use */
|
||||
@ -556,7 +555,7 @@ static void nvme_unmap_data(struct nvme_dev *dev, struct request *req)
|
||||
if (iod->nr_allocations == 0)
|
||||
dma_pool_free(dev->prp_small_pool, iod->list[0].sg_list,
|
||||
iod->first_dma);
|
||||
else if (iod->use_sgl)
|
||||
else if (iod->nr_allocations == 1)
|
||||
dma_pool_free(dev->prp_page_pool, iod->list[0].sg_list,
|
||||
iod->first_dma);
|
||||
else
|
||||
@ -808,8 +807,7 @@ static blk_status_t nvme_map_data(struct nvme_dev *dev, struct request *req,
|
||||
goto out_free_sg;
|
||||
}
|
||||
|
||||
iod->use_sgl = nvme_pci_use_sgls(dev, req, iod->sgt.nents);
|
||||
if (iod->use_sgl)
|
||||
if (nvme_pci_use_sgls(dev, req, iod->sgt.nents))
|
||||
ret = nvme_pci_setup_sgls(dev, req, &cmnd->rw);
|
||||
else
|
||||
ret = nvme_pci_setup_prps(dev, req, &cmnd->rw);
|
||||
|
Loading…
x
Reference in New Issue
Block a user