drivers/mic/scif: do not use mmap_sem
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 6 Feb 2019 17:59:16 +0000 (09:59 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 7 Feb 2019 19:54:02 +0000 (12:54 -0700)
commit4f564ff3d4dd887955b25b83d06989610769bf32
tree679b0c3bf19ebb6cebaf03f10ab8f103bfab0366
parent70f8a3ca68d3e1f3344d959981ca55d5f6ec77f7
drivers/mic/scif: do not use mmap_sem

The driver uses mmap_sem for both pinned_vm accounting and
get_user_pages(). By using gup_fast() and letting the mm handle the lock
if needed, we can no longer rely on the semaphore and simplify the whole
thing.

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/misc/mic/scif/scif_rma.c