Re: [PATCH v2 4/7] iov_iter: new iov_iter_pin_pages*() routines

From: John Hubbard
Date: Fri Sep 23 2022 - 00:34:40 EST


On 9/22/22 04:29, Jan Kara wrote:
> I don't think this will work. The pin nfs_direct_read_schedule_iovec()
> obtains needs to be released once the IO is completed. Not once the IO is
> submitted. Notice how nfs_create_request()->__nfs_create_request() gets
> another page reference which is released on completion
> (nfs_direct_read_completion->nfs_release_request->nfs_page_group_destroy->
> nfs_free_request->nfs_clear_request). And we need to stop releasing the
> obtained pin in nfs_direct_read_schedule_iovec() (and acquiring another
> reference in __nfs_create_request()) and instead propagate it to
> nfs_clear_request() where it can get released.
>
> Honza

OK, now I see how that is supposed to work, thanks for explaining!


thanks,

--
John Hubbard
NVIDIA