drivers/IB,hfi1: do not se mmap_sem
authorDavidlohr Bueso <dave@stgolabs.net>
Thu, 7 Feb 2019 00:58:45 +0000 (11:58 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 8 Feb 2019 09:30:57 +0000 (20:30 +1100)
commita68255c69326ca93fe8f65fbc08bb68966bec3e7
treebf888a2149b891af191d9a56829d6b8a5017a88d
parent189debd1506d584c8ba3f6936399da051100f808
drivers/IB,hfi1: do not se mmap_sem

This driver already uses gup_fast() and thus we can just drop the mmap_sem
protection around the pinned_vm counter.  Note that the window between
when hfi1_can_pin_pages() is called and the actual counter is incremented
remains the same as mmap_sem was _only_ used for when ->pinned_vm was
touched.

Link: http://lkml.kernel.org/r/20190206175920.31082-5-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.det>
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/hw/hfi1/user_pages.c