RDMA/uverbs: Get rid of ucontext->tgid
authorJason Gunthorpe <jgg@mellanox.com>
Sun, 16 Sep 2018 17:48:12 +0000 (20:48 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 21 Sep 2018 15:58:36 +0000 (11:58 -0400)
Nothing uses this now, just delete it.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/rdma_core.c
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h

index 6a3acf4bf78a904c7d97a6c02ca37e818e12f327..752a55c6bdce5494919bcfcfff0d967925f22345 100644 (file)
@@ -816,7 +816,6 @@ static void ufile_destroy_ucontext(struct ib_uverbs_file *ufile,
                        ib_dev->disassociate_ucontext(ucontext);
        }
 
-       put_pid(ucontext->tgid);
        ib_rdmacg_uncharge(&ucontext->cg_obj, ib_dev,
                           RDMACG_RESOURCE_HCA_HANDLE);
 
index d77b0b9793c776ac215b7366e44f90cbf793b141..91d3e4029cd592e4032e21606a7efb0c647844ea 100644 (file)
@@ -117,9 +117,6 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file,
        /* ufile is required when some objects are released */
        ucontext->ufile = file;
 
-       rcu_read_lock();
-       ucontext->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
-       rcu_read_unlock();
        ucontext->closing = false;
        ucontext->cleanup_retryable = false;
 
@@ -169,7 +166,6 @@ err_fd:
        put_unused_fd(resp.async_fd);
 
 err_free:
-       put_pid(ucontext->tgid);
        ib_dev->dealloc_ucontext(ucontext);
 
 err_alloc:
index 6437e6af758d84afa12900ccdd1445f612782f16..0d822a9db300a7a010d0dfdaa15152f1df7b697c 100644 (file)
@@ -1500,7 +1500,6 @@ struct ib_ucontext {
 
        bool cleanup_retryable;
 
-       struct pid             *tgid;
 #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
        void (*invalidate_range)(struct ib_umem_odp *umem_odp,
                                 unsigned long start, unsigned long end);