X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fnvme%2Fhost%2Frdma.c;h=a249db528d543dcad37e9b5162cc4b196a2f41e1;hb=2a3c389a0fde49b241430df806a34276568cfb29;hp=f3e3a8c861d610b29a5f057762e3bfbb7602a7c9;hpb=0b043644c0ca601cb19943a81aa1f1455dbe9461;p=linux.git diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index f3e3a8c861d6..a249db528d54 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1144,7 +1144,7 @@ static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue, WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE); nvme_cleanup_cmd(rq); - sg_free_table_chained(&req->sg_table, true); + sg_free_table_chained(&req->sg_table, SG_CHUNK_SIZE); } static int nvme_rdma_set_sg_null(struct nvme_command *c) @@ -1259,7 +1259,8 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue, req->sg_table.sgl = req->first_sgl; ret = sg_alloc_table_chained(&req->sg_table, - blk_rq_nr_phys_segments(rq), req->sg_table.sgl); + blk_rq_nr_phys_segments(rq), req->sg_table.sgl, + SG_CHUNK_SIZE); if (ret) return -ENOMEM; @@ -1299,7 +1300,7 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue, req->nents, rq_data_dir(rq) == WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE); out_free_table: - sg_free_table_chained(&req->sg_table, true); + sg_free_table_chained(&req->sg_table, SG_CHUNK_SIZE); return ret; }