diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-02-12 20:39:16 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-02-22 14:11:37 -0700 |
commit | a2a074ef396f8738d9ee08ceefa8811381a4fe4f (patch) | |
tree | 2ed757d088b33ced2ae73da2a9594012204e07a5 /drivers/infiniband/core/rdma_core.c | |
parent | afc1990e089f501d686bb95b98146fc7ba23347f (diff) | |
download | linux-stable-a2a074ef396f8738d9ee08ceefa8811381a4fe4f.tar.gz linux-stable-a2a074ef396f8738d9ee08ceefa8811381a4fe4f.tar.bz2 linux-stable-a2a074ef396f8738d9ee08ceefa8811381a4fe4f.zip |
RDMA: Handle ucontext allocations by IB/core
Following the PD conversion patch, do the same for ucontext allocations.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/rdma_core.c')
-rw-r--r-- | drivers/infiniband/core/rdma_core.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/infiniband/core/rdma_core.c b/drivers/infiniband/core/rdma_core.c index 96f919fe86e7..778375ff664e 100644 --- a/drivers/infiniband/core/rdma_core.c +++ b/drivers/infiniband/core/rdma_core.c @@ -844,7 +844,6 @@ static void ufile_destroy_ucontext(struct ib_uverbs_file *ufile, { struct ib_ucontext *ucontext = ufile->ucontext; struct ib_device *ib_dev = ucontext->device; - int ret; /* * If we are closing the FD then the user mmap VMAs must have @@ -862,12 +861,8 @@ static void ufile_destroy_ucontext(struct ib_uverbs_file *ufile, rdma_restrack_del(&ucontext->res); - /* - * FIXME: Drivers are not permitted to fail dealloc_ucontext, remove - * the error return. - */ - ret = ib_dev->ops.dealloc_ucontext(ucontext); - WARN_ON(ret); + ib_dev->ops.dealloc_ucontext(ucontext); + kfree(ucontext); ufile->ucontext = NULL; } |