Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2124556pxa; Mon, 24 Aug 2020 06:02:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWB3pGpaq/BHwMMaOHQLd6QJbwKsNc2lfVZnx8jvVJP9SBn2s/VQeHSkQeak9yscd/ABmq X-Received: by 2002:a17:906:393:: with SMTP id b19mr5403717eja.268.1598274147115; Mon, 24 Aug 2020 06:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598274147; cv=none; d=google.com; s=arc-20160816; b=V1McfRAqOiGF52uD2f5gK8ZonoYhyi6P1ZL5UPl6ZHzTnwV2S/6BUpqNN35eFRjXX7 nM21Ae5mbP829A8mQlSrIorvNqRKvw+KT/NeB33hdZ6z2TYBDk3neMZ/RoqZeOgrB7kS gVv6Z3/Arwjb0ZEP8imKqhnFE9PioPi84ExIbwBPZVAzfS7j6cSNa2E7pMbfOFAF3+/6 ahlRg8kLh1BzdZNOdH3Qo2XWUfEkQqxH6aEL6GwyP9/ssIGcvZN9ZB+GdOKxeya+QLen 1kdqfcVutyqxmaayawWAqXeTVRJY0tzb3hE2NQrEyi/Rz7mQPjhryCSPHqH7dqZFqJif WTTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from; bh=a7DtkyGhIiqafSh46jVtGK88vNtvg7FmWKyjeJCk0N8=; b=EaNz/vfG/Qx/l4KRaER9JPYQcegnMhLqLKCvELea0MKwrZxKcBtfbHvDx+yk20eLuP n5XAZ5LLpcKEvof7IGnf4XtR8haOC8flMsc0i3piREvh3MDpup5nQhcrifJWl8ZC3Mrf iewLvMudT9idAmiXsVic3gELvptMtzEIsQNdrvz0ujjDissz6FTa2MLweHN/mLk9BIG8 cgjOpmyqSheAsLe7Kt4UFWOo+3I+yCX3jDnFiXntJUWGGrYudlwTibGx20BpgiKKG2KH EflUTmaEInd9phn3VqDTcCbg66CTAOOpGem6Bz+osSY1J4+/GKNh2CGsQlJ9yiT5pYuL LwAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn10si7480900ejc.547.2020.08.24.06.02.02; Mon, 24 Aug 2020 06:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727883AbgHXM61 (ORCPT + 99 others); Mon, 24 Aug 2020 08:58:27 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:50327 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbgHXMzV (ORCPT ); Mon, 24 Aug 2020 08:55:21 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R691e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=21;SR=0;TI=SMTPD_---0U6k9-bl_1598273712; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U6k9-bl_1598273712) by smtp.aliyun-inc.com(127.0.0.1); Mon, 24 Aug 2020 20:55:14 +0800 From: Alex Shi To: akpm@linux-foundation.org, mgorman@techsingularity.net, tj@kernel.org, hughd@google.com, khlebnikov@yandex-team.ru, daniel.m.jordan@oracle.com, willy@infradead.org, hannes@cmpxchg.org, lkp@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, shakeelb@google.com, iamjoonsoo.kim@lge.com, richard.weiyang@gmail.com, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com, mhocko@suse.com, vdavydov.dev@gmail.com, shy828301@gmail.com Subject: [PATCH v18 04/32] mm/thp: clean up lru_add_page_tail Date: Mon, 24 Aug 2020 20:54:37 +0800 Message-Id: <1598273705-69124-5-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1598273705-69124-1-git-send-email-alex.shi@linux.alibaba.com> References: <1598273705-69124-1-git-send-email-alex.shi@linux.alibaba.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the first parameter is only used by head page, it's better to make it explicit. Signed-off-by: Alex Shi Reviewed-by: Kirill A. Shutemov Cc: Andrew Morton Cc: Johannes Weiner Cc: Matthew Wilcox Cc: Hugh Dickins Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/huge_memory.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 84fb64e8faa1..739497770a3d 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2313,19 +2313,19 @@ static void remap_page(struct page *page) } } -static void lru_add_page_tail(struct page *page, struct page *page_tail, +static void lru_add_page_tail(struct page *head, struct page *page_tail, struct lruvec *lruvec, struct list_head *list) { - VM_BUG_ON_PAGE(!PageHead(page), page); - VM_BUG_ON_PAGE(PageCompound(page_tail), page); - VM_BUG_ON_PAGE(PageLRU(page_tail), page); + VM_BUG_ON_PAGE(!PageHead(head), head); + VM_BUG_ON_PAGE(PageCompound(page_tail), head); + VM_BUG_ON_PAGE(PageLRU(page_tail), head); lockdep_assert_held(&lruvec_pgdat(lruvec)->lru_lock); if (!list) SetPageLRU(page_tail); - if (likely(PageLRU(page))) - list_add_tail(&page_tail->lru, &page->lru); + if (likely(PageLRU(head))) + list_add_tail(&page_tail->lru, &head->lru); else if (list) { /* page reclaim is reclaiming a huge page */ get_page(page_tail); -- 1.8.3.1