Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2927327ybh; Sat, 25 Jul 2020 06:01:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrxogILsroLMeyyyqsp8634IQ1/6qjaDsTgNNFKMd4qEPUiuDG8X7LEr1/ONxDraO/3pU7 X-Received: by 2002:a17:906:60c6:: with SMTP id f6mr12652878ejk.265.1595682066347; Sat, 25 Jul 2020 06:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595682066; cv=none; d=google.com; s=arc-20160816; b=t5ZzhkIKl4NaWCLFbkqJDlDgZI8wnlpDO/Y0BqnGGZ1FCuzwXhM8fRe0EEHspv8Eg5 0ugoRP6HidEI/ND9V4HbUz+oSYbLc1a299RIxTgOtmk7zwHMyo7Fw9GNaDDjofSQU5N5 z2eJkSx5sM9DL9DGSF61McqLjpYNjOtR1rRvoZH6zrhwWIXWnhWNAChwj/LIknE26YAd U33W+t2mZy/Uccs1Z0U3mRa5mN58/b8T4qICy2DaZ8uVbHJTuy2dXBrgt+VH+SuC+PsH cOceWlYVcK1h1b1FJ9vkErvh4N76w3I3I/YHHPHnsQZfI+hBozKvl3ApnKoqT9BGx4a3 8kow== 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=wJPmxyRIZQjsBnt3h21H8X9K/fM0qGpyvVoI0QFWbR0=; b=ziKp2Ze7IjHL+aTwAG4WBrZ/DzEkaHQeBI00rI6tRCF8wQlb+K6Lpvb1PM5YoNL2wt OM54XHjPoB4S3GpqOZVAD/pufODNKQ/1o7r0NXAoOjm9uiCoeYnN2GJ1yG1jSMVWUwNK w6AgFJJDlDAR7a1DKMaXmTDBX+ei42jYhtc53gwA2dpCVVf5BT3KyHeibxmOIvKZg6K3 1EF39jm67drF8IZ0oaWaur6GzoWLuvM+R4W3xyTqGXDWL+0L+cz7szXX+XG+8dzbO88b atpF7Y2AWEr208SgWQNfJmxT3LTBC16v+9vHzz2tlnMvFBsUY7rooA03ViY4f/YnCeLh 979w== 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 sa7si2537022ejb.564.2020.07.25.06.00.43; Sat, 25 Jul 2020 06:01:06 -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 S1727779AbgGYNAb (ORCPT + 99 others); Sat, 25 Jul 2020 09:00:31 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:46328 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbgGYNA3 (ORCPT ); Sat, 25 Jul 2020 09:00:29 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07484;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=19;SR=0;TI=SMTPD_---0U3l6fmD_1595682015; Received: from aliy8.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U3l6fmD_1595682015) by smtp.aliyun-inc.com(127.0.0.1); Sat, 25 Jul 2020 21:00:23 +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, kirill@shutemov.name, alexander.duyck@gmail.com, rong.a.chen@intel.com Subject: [PATCH v17 06/21] mm/thp: clean up lru_add_page_tail Date: Sat, 25 Jul 2020 20:59:43 +0800 Message-Id: <1595681998-19193-7-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1595681998-19193-1-git-send-email-alex.shi@linux.alibaba.com> References: <1595681998-19193-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 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