RDMA/uverbs: Declare closing variable as boolean
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 3 Sep 2018 17:18:03 +0000 (20:18 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Wed, 5 Sep 2018 21:59:06 +0000 (15:59 -0600)
The "closing" variable is used as boolean and set to "true" in one
place, update the declaration of that variable and their other
assignment to proper type.

Fixes: e951747a087a ("IB/uverbs: Rework the locking for cleaning up the ucontext")
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_verbs.h

index a21d5214afc367b260fd445642c55e6040d02dfb..4b72851ade24083b511be74505157cfe88685530 100644 (file)
@@ -120,7 +120,7 @@ ssize_t ib_uverbs_get_context(struct ib_uverbs_file *file,
        rcu_read_lock();
        ucontext->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
        rcu_read_unlock();
-       ucontext->closing = 0;
+       ucontext->closing = false;
        ucontext->cleanup_retryable = false;
 
 #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
index df8d234a2b561ee1c8f5a9f04b1816bd5a94dd1e..a4c3a09a91bc99a2c18499c643c73adf4fb78f86 100644 (file)
@@ -1486,7 +1486,7 @@ struct ib_ucontext {
         * it is set when we are closing the file descriptor and indicates
         * that mm_sem may be locked.
         */
-       int                     closing;
+       bool closing;
 
        bool cleanup_retryable;