RDMA/core: Remove ucontext->closing
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 29 Sep 2020 16:09:07 +0000 (13:09 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 30 Sep 2020 18:27:19 +0000 (15:27 -0300)
Nothing reads this any more, and the reason for its existence has passed
due to the deferred fput() scheme.

Fixes: 8ea1f989aa07 ("drivers/IB,usnic: reduce scope of mmap_sem")
Link: https://lore.kernel.org/r/0-v1-df64ff042436+42-uctx_closing_jgg@nvidia.com
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/rdma_core.c
include/rdma/ib_verbs.h

index d2b5417..ffe11b0 100644 (file)
@@ -889,7 +889,6 @@ void uverbs_destroy_ufile_hw(struct ib_uverbs_file *ufile,
        if (!ufile->ucontext)
                goto done;
 
-       ufile->ucontext->closing = true;
        ufile->ucontext->cleanup_retryable = true;
        while (!list_empty(&ufile->uobjects))
                if (__uverbs_cleanup_ufile(ufile, reason)) {
index f185029..5ad9973 100644 (file)
@@ -1477,12 +1477,6 @@ struct ib_rdmacg_object {
 struct ib_ucontext {
        struct ib_device       *device;
        struct ib_uverbs_file  *ufile;
-       /*
-        * 'closing' can be read by the driver only during a destroy callback,
-        * it is set when we are closing the file descriptor and indicates
-        * that mm_sem may be locked.
-        */
-       bool closing;
 
        bool cleanup_retryable;