Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2036561ybt; Thu, 2 Jul 2020 22:11:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzNbOrQ17WoZHfJbzeFfEYSv3jXu6anVflPxtBMAKWo5Jm/so7EmTkIj4iauCEI6N9QeMU X-Received: by 2002:a50:ee07:: with SMTP id g7mr23490341eds.320.1593753077090; Thu, 02 Jul 2020 22:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593753077; cv=none; d=google.com; s=arc-20160816; b=QrjMZ5Sl+9bfAC5CtdEczQge9kp/03Opdxry7KYnXRtfnNthP3HvxofMCJ+jSd7vCO VL4lsQ445WqSeIRHasqoeifeqMP6p7poVaNBGUS7ot29ze0I8QlDJzdn1VkdZ+3BiMeg fCZcu8wUhCYPsTQz9gFb2oa3LSwRKhdfdQSAIK5NKv2e5VI7BPCC1jB+D2pgRwTG613E M3WiGOXNwJG9z7sbkkR9qZDYq+yDUGFJHwP9X0xITmpwYfUCNGfV0Iwk3Z6feiy1kW5X NDmNqIjfrsjmME1QPE6xCy+wCMe2olWshPMd8oMs2HR1UkTA8mP+hlf0aIZ3dIldGzO3 IgGg== 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=TIAilOQ7ODi+hC9ccHRKhVWED9o7ZOAPCp1LxDU8Nkg=; b=aklv+dAe0D0ruHF2ELsOD9E4sspyfuET5gbxXVqCmwUejNPCQd4H2XEzGnPuQvHIB3 LQz4OpDBgv1W8oFpJHhpOcFEbwlLzo6r/5ZRyzj5TJyRDewZj+gd3lHvVsi+EhQMlOeu rmWLEsjbO7Bqy+qffEHa8cQHE/75PdQKqcg63KhVbkmZQvIRjtuBFtlCH6mbdABunsb8 MHCAPXho+xbLjs0R9hyDKiVgzBvKp734KQM0V5fDVIvXAWIakOqQuVsOn2H4609UB/sE M93a+VRxSO22T7IVG7PcM5Ut96mBok747/EwcpW5lbfjymQMvPMbXcNNyA6gaZICjE9P XOAQ== 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 ck17si6608224edb.508.2020.07.02.22.10.54; Thu, 02 Jul 2020 22:11:17 -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 S1726444AbgGCFIp (ORCPT + 99 others); Fri, 3 Jul 2020 01:08:45 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:55242 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbgGCFIk (ORCPT ); Fri, 3 Jul 2020 01:08:40 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01358;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0U1Y4LGX_1593752912; Received: from alexshi-test.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U1Y4LGX_1593752912) by smtp.aliyun-inc.com(127.0.0.1); Fri, 03 Jul 2020 13:08:35 +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, yang.shi@linux.alibaba.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 Subject: [PATCH v14 06/20] mm/thp: clean up lru_add_page_tail Date: Fri, 3 Jul 2020 13:07:39 +0800 Message-Id: <1593752873-4493-7-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1593752873-4493-1-git-send-email-alex.shi@linux.alibaba.com> References: <1593752873-4493-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 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 9e050b13f597..b18f21da4dac 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2340,19 +2340,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