diff options
author | Maor Gottlieb <maorg@nvidia.com> | 2021-08-24 16:25:29 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2021-08-24 20:21:14 +0200 |
commit | 90e7a6de62781c27d6a111fccfb19b807f9b6887 (patch) | |
tree | 3d6375338bcc2032b928772f59bbbd3b410389f3 /drivers/infiniband | |
parent | Linux 5.14-rc6 (diff) | |
download | linux-90e7a6de62781c27d6a111fccfb19b807f9b6887.tar.xz linux-90e7a6de62781c27d6a111fccfb19b807f9b6887.zip |
lib/scatterlist: Provide a dedicated function to support table append
RDMA is the only in-kernel user that uses __sg_alloc_table_from_pages to
append pages dynamically. In the next patch. That mode will be extended
and that function will get more parameters. So separate it into a unique
function to make such change more clear.
Link: https://lore.kernel.org/r/20210824142531.3877007-2-maorg@nvidia.com
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/umem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c index 0eb40025075f..b741758e528f 100644 --- a/drivers/infiniband/core/umem.c +++ b/drivers/infiniband/core/umem.c @@ -226,8 +226,8 @@ struct ib_umem *ib_umem_get(struct ib_device *device, unsigned long addr, cur_base += ret * PAGE_SIZE; npages -= ret; - sg = __sg_alloc_table_from_pages(&umem->sg_head, page_list, ret, - 0, ret << PAGE_SHIFT, + sg = sg_alloc_append_table_from_pages(&umem->sg_head, page_list, + ret, 0, ret << PAGE_SHIFT, ib_dma_max_seg_size(device), sg, npages, GFP_KERNEL); umem->sg_nents = umem->sg_head.nents; |