Skip to content

Commit

Permalink
mm/swap: fix the comment of get_kernel_pages
Browse files Browse the repository at this point in the history
If no pages were pinned, 0 is returned in fact.  Fix the corresponding
comment.

[[email protected]: s/nr_pages/nr_segs/ also, per David, reflow comment]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Cc: Alistair Popple <[email protected]>
Cc: David Howells <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: NeilBrown <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Oscar Salvador <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
MiaoheLin authored and akpm00 committed May 19, 2022
1 parent 3c3115a commit 133d274
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mm/swap.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ EXPORT_SYMBOL(put_pages_list);
* @pages: array that receives pointers to the pages pinned.
* Should be at least nr_segs long.
*
* Returns number of pages pinned. This may be fewer than the number
* requested. If nr_pages is 0 or negative, returns 0. If no pages
* were pinned, returns -errno. Each page returned must be released
* with a put_page() call when it is finished with.
* Returns number of pages pinned. This may be fewer than the number requested.
* If nr_segs is 0 or negative, returns 0. If no pages were pinned, returns 0.
* Each page returned must be released with a put_page() call when it is
* finished with.
*/
int get_kernel_pages(const struct kvec *kiov, int nr_segs, int write,
struct page **pages)
Expand Down

0 comments on commit 133d274

Please sign in to comment.