drivers/IB,core: reduce scope of mmap_sem
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 6 Feb 2019 17:59:20 +0000 (09:59 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 7 Feb 2019 19:54:02 +0000 (12:54 -0700)
commitb95df5e3e45914c679fa5d4ca08abdd1c98b9f50
tree3e87173f21b35bfbf8b2550051fa41d06b4c9fb4
parent8ea1f989aa07a095cbf4aabbf9be7c3a18ce31bf
drivers/IB,core: reduce scope of mmap_sem

ib_umem_get() uses gup_longterm() and relies on the lock to stabilze the
vma_list, so we cannot really get rid of mmap_sem altogether, but now that
the counter is atomic, we can get of some complexity that mmap_sem brings
with only pinned_vm.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/umem.c