From patchwork Tue Dec 29 03:11:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rongwei Wang X-Patchwork-Id: 11991913 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32637C433E0 for ; Tue, 29 Dec 2020 03:12:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B2BB8207C5 for ; Tue, 29 Dec 2020 03:12:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B2BB8207C5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DA8D98D0023; Mon, 28 Dec 2020 22:12:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D32DE8D0018; Mon, 28 Dec 2020 22:12:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C46978D0023; Mon, 28 Dec 2020 22:12:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id AA3DC8D0018 for ; Mon, 28 Dec 2020 22:12:16 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 5F06C181AEF0B for ; Tue, 29 Dec 2020 03:12:16 +0000 (UTC) X-FDA: 77644846272.11.mass24_0e0a44c27499 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 3C109180F8B82 for ; Tue, 29 Dec 2020 03:12:16 +0000 (UTC) X-HE-Tag: mass24_0e0a44c27499 X-Filterd-Recvd-Size: 1948 Received: from out4436.biz.mail.alibaba.com (out4436.biz.mail.alibaba.com [47.88.44.36]) by imf10.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Dec 2020 03:12:14 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0UK6RXMx_1609211518; Received: from localhost.localdomain(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0UK6RXMx_1609211518) by smtp.aliyun-inc.com(127.0.0.1); Tue, 29 Dec 2020 11:11:58 +0800 From: Rongwei Wang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, rongwei.wang@linux.alibaba.com Subject: [PATCH] mm: rectify a page bad reason Date: Tue, 29 Dec 2020 11:11:56 +0800 Message-Id: <20201229031156.3861-1-rongwei.wang@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 --- 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))