mm: fix up get_user_pages* comments

In the previous round of get_user_pages* changes comments attached to
__get_user_pages_unlocked() and get_user_pages_unlocked() were rendered
incorrect, this patch corrects them.

In addition the get_user_pages_unlocked() comment seems to have already
been outdated as it referred to tsk, mm parameters which were removed in
c12d2da5 ("mm/gup: Remove the macro overload API migration helpers from
the get_user*() APIs"), this patch fixes this also.

Link: http://lkml.kernel.org/r/20161025233435.5338-1-lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Lorenzo Stoakes 2016-12-12 16:42:46 -08:00 committed by Linus Torvalds
parent 692a68c154
commit 80a7951627

View File

@ -858,14 +858,12 @@ long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
EXPORT_SYMBOL(get_user_pages_locked); EXPORT_SYMBOL(get_user_pages_locked);
/* /*
* Same as get_user_pages_unlocked(...., FOLL_TOUCH) but it allows to * Same as get_user_pages_unlocked(...., FOLL_TOUCH) but it allows for
* pass additional gup_flags as last parameter (like FOLL_HWPOISON). * tsk, mm to be specified.
* *
* NOTE: here FOLL_TOUCH is not set implicitly and must be set by the * NOTE: here FOLL_TOUCH is not set implicitly and must be set by the
* caller if required (just like with __get_user_pages). "FOLL_GET", * caller if required (just like with __get_user_pages). "FOLL_GET"
* "FOLL_WRITE" and "FOLL_FORCE" are set implicitly as needed * is set implicitly if "pages" is non-NULL.
* according to the parameters "pages", "write", "force"
* respectively.
*/ */
__always_inline long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm, __always_inline long __get_user_pages_unlocked(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, unsigned long nr_pages, unsigned long start, unsigned long nr_pages,
@ -895,10 +893,8 @@ EXPORT_SYMBOL(__get_user_pages_unlocked);
* get_user_pages_unlocked(tsk, mm, ..., pages); * get_user_pages_unlocked(tsk, mm, ..., pages);
* *
* It is functionally equivalent to get_user_pages_fast so * It is functionally equivalent to get_user_pages_fast so
* get_user_pages_fast should be used instead, if the two parameters * get_user_pages_fast should be used instead if specific gup_flags
* "tsk" and "mm" are respectively equal to current and current->mm, * (e.g. FOLL_FORCE) are not required.
* or if "force" shall be set to 1 (get_user_pages_fast misses the
* "force" parameter).
*/ */
long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages, long get_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
struct page **pages, unsigned int gup_flags) struct page **pages, unsigned int gup_flags)