Re: [PATCH v3 11/23] IB/{core,hw,umem}: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-12 Thread Jason Gunthorpe
On Mon, Nov 11, 2019 at 04:06:48PM -0800, John Hubbard wrote: > @@ -542,7 +541,7 @@ static int ib_umem_odp_map_dma_single_page( > } > > out: > - put_user_page(page); > + put_page(page); > > if (remove_existing_mapping) { >

Re: [PATCH v3 11/23] IB/{core,hw,umem}: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-12 Thread John Hubbard
On 11/12/19 12:44 PM, Jason Gunthorpe wrote: > On Mon, Nov 11, 2019 at 04:06:48PM -0800, John Hubbard wrote: >> @@ -542,7 +541,7 @@ static int ib_umem_odp_map_dma_single_page( >> } >> >> out: >> -put_user_page(page); >> +put_page(page); >> >> if (remove_existing_mapping) {

[PATCH v3 11/23] IB/{core, hw, umem}: set FOLL_PIN, FOLL_LONGTERM via pin_longterm_pages*()

2019-11-11 Thread John Hubbard
Convert infiniband to use the new wrapper calls, and stop explicitly setting FOLL_LONGTERM at the call sites. The new pin_longterm_*() calls replace get_user_pages*() calls, and set both FOLL_LONGTERM and a new FOLL_PIN flag. The FOLL_PIN flag requires that the caller must return the pages via