]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drivers/IB,hfi1: do not se mmap_sem
authorDavidlohr Bueso <dave@stgolabs.net>
Wed, 6 Feb 2019 17:59:18 +0000 (09:59 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 7 Feb 2019 19:54:02 +0000 (12:54 -0700)
commit0e15c253363e9a8824e6b9c9fc17468eb924cebd
treee86afa16b5536b453bddf3a45f1e3b794d47a61b
parent3a2a1e90564e3ad215aa5c6ddc0e741cd6208a93
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.

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