drivers/IB,core: reduce scope of mmap_sem
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 7 Feb 2019 00:58:46 +0000 (11:58 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 8 Feb 2019 09:30:57 +0000 (20:30 +1100)
commit783e3255e7dea3f723afe41ca57ba9ff89f850dc
tree4a1b56eb10e619f871cf35e161fcd25f476ec9b1
parent1dec049d16df29407425ba466ea52500dc78cbe3
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.

Link: http://lkml.kernel.org/r/20190206175920.31082-7-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
drivers/infiniband/core/umem.c