lkml.org 
[lkml]   [2020]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm: rectify a page bad reason
Date
Hi

When I was doing some memory-related projects, it always reported error
"nonzero mapcount", but its judgment condition was that _mapcount was not equal
to -1, so I felt the original string was a bit inappropriate, so I tried to
update it.

Signed-off-by: Rongwei Wang <rongwei.wang@linux.alibaba.com>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7a2c89b..57d7f26 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1114,7 +1114,7 @@ static const char *page_bad_reason(struct page *page, unsigned long flags)
const char *bad_reason = NULL;

if (unlikely(atomic_read(&page->_mapcount) != -1))
- bad_reason = "nonzero mapcount";
+ bad_reason = "non-(-1) _mapcount";
if (unlikely(page->mapping != NULL))
bad_reason = "non-NULL mapping";
if (unlikely(page_ref_count(page) != 0))
--
1.8.3.1
\
 
 \ /
  Last update: 2020-12-29 04:13    [W:0.051 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site