lkml.org 
[lkml]   [2022]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 14/15] mm/swap: fix the comment of get_kernel_pages
Date
If no pages were pinned, 0 is returned in fact. Fix the corresponding
comment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
mm/swap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/swap.c b/mm/swap.c
index 6d2c37f781f8..236b37663a1a 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -168,8 +168,8 @@ EXPORT_SYMBOL(put_pages_list);
*
* 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.
+ * 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)
--
2.23.0
\
 
 \ /
  Last update: 2022-05-09 15:16    [W:0.220 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site