On Tue, Feb 12, 2019 at 10:56:07AM +0800, Peter Xu wrote: > There's plenty of places around __get_user_pages() that has a parameter > "nonblocking" which does not really mean that "it won't block" (because > it can really block) but instead it shows whether the mmap_sem is > released by up_read() during the page fault handling mostly when > VM_FAULT_RETRY is returned. > > We have the correct naming in e.g. get_user_pages_locked() or > get_user_pages_remote() as "locked", however there're still many places > that are using the "nonblocking" as name. > > Renaming the places to "locked" where proper to better suite the > functionality of the variable. While at it, fixing up some of the > comments accordingly. > > Reviewed-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Peter Xu <peterx@xxxxxxxxxx> Minor issue see below Reviewed-by: Jérôme Glisse <jglisse@xxxxxxxxxx> [...] > @@ -656,13 +656,11 @@ static int check_vma_flags(struct vm_area_struct *vma, unsigned long gup_flags) > * appropriate) must be called after the page is finished with, and > * before put_page is called. > * > - * If @nonblocking != NULL, __get_user_pages will not wait for disk IO > - * or mmap_sem contention, and if waiting is needed to pin all pages, > - * *@nonblocking will be set to 0. Further, if @gup_flags does not > - * include FOLL_NOWAIT, the mmap_sem will be released via up_read() in > - * this case. > + * If @locked != NULL, *@locked will be set to 0 when mmap_sem is > + * released by an up_read(). That can happen if @gup_flags does not > + * has FOLL_NOWAIT. I am not a native speaker but i believe the correct wording is: @gup_flags does not have FOLL_NOWAIT