memfd: Convert memfd_wait_for_pins to XArray
authorMatthew Wilcox <willy@infradead.org>
Wed, 22 Nov 2017 16:11:31 +0000 (11:11 -0500)
committerMatthew Wilcox <willy@infradead.org>
Sun, 21 Oct 2018 14:46:40 +0000 (10:46 -0400)
commit2313216f861f955c2091f1593ea95d5dc88493f4
treea99b5b43a66a6ee840e2b2619d2095c98623bd7d
parent7ae3424fb4b5587d9b2db12a4b1040c52073dd5c
memfd: Convert memfd_wait_for_pins to XArray

Simplify the locking by taking the spinlock while we walk the tree on
the assumption that many acquires and releases of the lock will be worse
than holding the lock while we process an entire batch of pages.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
mm/memfd.c