From patchwork Sat Apr 11 22:03:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11484247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2EAE92C for ; Sat, 11 Apr 2020 22:04:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F8722051A for ; Sat, 11 Apr 2020 22:04:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rdudLdLt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F8722051A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E640A8E00B7; Sat, 11 Apr 2020 18:04:28 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E146C8E0007; Sat, 11 Apr 2020 18:04:28 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D2BF28E00B7; Sat, 11 Apr 2020 18:04:28 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id B91278E0007 for ; Sat, 11 Apr 2020 18:04:28 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6F46D180AD801 for ; Sat, 11 Apr 2020 22:04:28 +0000 (UTC) X-FDA: 76696953816.02.bird03_613833c661150 X-Spam-Summary: 2,0,0,5f5111d4f47a2875,d41d8cd98f00b204,richard.weiyang@gmail.com,,RULES_HIT:41:355:379:541:800:960:965:966:973:988:989:1260:1345:1359:1437:1534:1541:1711:1730:1747:1777:1792:2196:2198:2199:2200:2393:2559:2562:2731:2898:3138:3139:3140:3141:3142:3352:3865:3866:3867:3871:3872:4321:4385:4390:4395:5007:6261:6653:7514:8957:9413:10004:11026:11473:11658:11914:12043:12297:12438:12517:12519:12555:12895:13069:13311:13357:14096:14181:14384:14687:14721:21080:21444:21627:21666:21990:30029:30054:30070,0,RBL:209.85.221.66:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: bird03_613833c661150 X-Filterd-Recvd-Size: 4713 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Sat, 11 Apr 2020 22:04:27 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id k11so5569917wrp.5 for ; Sat, 11 Apr 2020 15:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zI3tJmo+o+GXkNWorcFoXLz8vYcrcpDEFf4n0oB8dNo=; b=rdudLdLt+Nawf50OHLaGEZbuSLmsPXhfz7lk7AKWyU+MhDQEl+Y34nrbTY91Xft7O7 huTPmx4+3g4uAr1AZdQCTU6SAc3HlxQYB6/wuyehgG7lg59f2me4HHh/kMcNo8HZmWFh 7+wtHc9/sjpH9wPhXW80/8CVbvj+spUhdNnjLDDUtpAJ1t3IDWaRiWXYbaI165tE2aYt 9xT4we8RjKhbxzq5yNXiVAgGctE1AjiHpa+Dgo46he3PWO/te3c9+OSjoCLjSeObcgTe +LVKowsccr2I6H95b+3EnG5w7+7s1Ot5MPMnNqeEWAfDGx/7uRucaksMVGK+qkOcrEPw UDSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zI3tJmo+o+GXkNWorcFoXLz8vYcrcpDEFf4n0oB8dNo=; b=AdvKUgt8Mu3oeCo3pLx8BL6NXHp7qyjL4svbhrQdyOmOoFdj6B/XcpMVs6vhcijjSv cVDlBLaUYJTdEa33gQmYIz1p4KOmBwfRIx4zYhMsXFKu0AUCA76NjJ/4pLE3oz+NC6O9 p7ioN0O8hsKa0INLZW9AGRqx+8YpIbrNX0yI6u6njNSpWtkm2kjj9gsIrFDHIzo8OEjq 2N33yrDCegmBSJougwoPKPxGjiEIYXZg8C6W063Fcwlbvrd7+k+ICy5IJEIVsy/a2udl 9dU29qRodHff3CrbyC10TV+0EOUgg26SWoUNQncs+0RKcyxYkqfI3AS3zXYX135w4AEW I18w== X-Gm-Message-State: AGi0PuaM+DVUwfiA+YN5kmkx9867SS4k4XAhPnJCcqTGtJtW7Td/41qB W/9KgaOBQAoJhmFsSeinU5g= X-Google-Smtp-Source: APiQypJzdDa9QVHQo9kjB6Ga1pafDzWMGvrAsY+GfYzFLV0mb7eFmzRw19RNwSps0T8fxOPOM+LKMA== X-Received: by 2002:a5d:66c4:: with SMTP id k4mr12151090wrw.53.1586642667016; Sat, 11 Apr 2020 15:04:27 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id z18sm2342424wrw.41.2020.04.11.15.04.26 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Apr 2020 15:04:26 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, rientjes@google.com, anshuman.khandual@arm.com, david@redhat.com, Wei Yang Subject: [Patch v3 4/5] mm/page_alloc.c: rename free_pages_check() to check_free_page() Date: Sat, 11 Apr 2020 22:03:56 +0000 Message-Id: <20200411220357.9636-5-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200411220357.9636-1-richard.weiyang@gmail.com> References: <20200411220357.9636-1-richard.weiyang@gmail.com> 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: Function free_pages_check() is the counterpart of check_new_page(). Rename it to use the same name convention. Signed-off-by: Wei Yang --- mm/page_alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 85d7aec5fb45..dfcf2682ed40 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1032,7 +1032,7 @@ static void check_free_page_bad(struct page *page) bad_page(page, bad_reason); } -static inline int free_pages_check(struct page *page) +static inline int check_free_page(struct page *page) { if (likely(page_expected_state(page, PAGE_FLAGS_CHECK_AT_FREE))) return 0; @@ -1124,7 +1124,7 @@ static __always_inline bool free_pages_prepare(struct page *page, for (i = 1; i < (1 << order); i++) { if (compound) bad += free_tail_pages_check(page, page + i); - if (unlikely(free_pages_check(page + i))) { + if (unlikely(check_free_page(page + i))) { bad++; continue; } @@ -1136,7 +1136,7 @@ static __always_inline bool free_pages_prepare(struct page *page, if (memcg_kmem_enabled() && PageKmemcg(page)) __memcg_kmem_uncharge(page, order); if (check_free) - bad += free_pages_check(page); + bad += check_free_page(page); if (bad) return false; @@ -1183,7 +1183,7 @@ static bool free_pcp_prepare(struct page *page) static bool bulkfree_pcp_prepare(struct page *page) { if (debug_pagealloc_enabled_static()) - return free_pages_check(page); + return check_free_page(page); else return false; } @@ -1204,7 +1204,7 @@ static bool free_pcp_prepare(struct page *page) static bool bulkfree_pcp_prepare(struct page *page) { - return free_pages_check(page); + return check_free_page(page); } #endif /* CONFIG_DEBUG_VM */