Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp968777ybt; Tue, 7 Jul 2020 04:51:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHgygyVuAkDAq3UolP05HGrh8LbdM3V8VEF6kvI5nHA/8BcFK5jouv9a/2SBILAUSKcYdO X-Received: by 2002:a50:8d5a:: with SMTP id t26mr64297627edt.282.1594122662745; Tue, 07 Jul 2020 04:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594122662; cv=none; d=google.com; s=arc-20160816; b=p9ejG1A/zKludOqMT9E04Uv8ib+NAjKVbMtP+M/2yr+KsKniD6GbFycKZ0gXNaP1cM +aGDq7ytjVqxTVXobU9gW/ZVgxD7oSkwauBr+cvXkMbAjJCTlMSTRlqLOWbu+UHgAyqR XTqDky+nwdlDr0tN07MkdF8+4FqX2X2ZjfdjXPY2m7vWs55GQKhuhv5QDjaF7HwdOUZB tK1j1sD/ubRGlKJQUup9l0z0U0yqZjwj90UdP4/hynSK9h5VJlOdg6pxVRfJ2Uztz5yn C+666/p2YtK6/pU91Mkax96KtiCHc6CUEdCQrMr5rF1B3IIAVuj1mgXUfiUbrAdLS0HC Rnlg== 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:cc:to:from; bh=TIAilOQ7ODi+hC9ccHRKhVWED9o7ZOAPCp1LxDU8Nkg=; b=TfDI3oImRfjSXCIKg/uPIBJFtuTy6urAYfKc94PhuFuX4IwObDABA+LZIxbceF2TDA cRfX/l/rHQSxsUXSp1eZqOgibhkGWzocyRTDDvff7+DYqIx8gs0Gue9Fe7mjmQPfyBOT 52/evT1rZ0KvJMtlnevzMpIttjQWjVR9JWenvQ+iBtVM4JDOzW0wlgVA6FLyLVbvJueG C+o83tkra6kJH4Ef/t7P2V5qhCeDkqy425do6Rm9rENdQsIy/jO7uBd4/4QheyOekzTP Vpn0LM9kpgP26NolS2LY0jZ+/cgD2t2GXOj/n29TYdd5rqO+BhYOavSmZr9rLxrH6onD jg1g== 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 u25si15048754ejj.175.2020.07.07.04.50.39; Tue, 07 Jul 2020 04:51:02 -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 S1728818AbgGGLsQ (ORCPT + 99 others); Tue, 7 Jul 2020 07:48:16 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:54178 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728799AbgGGLsO (ORCPT ); Tue, 7 Jul 2020 07:48:14 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01422;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0U20joWQ_1594122436; Received: from alexshi-test.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0U20joWQ_1594122436) by smtp.aliyun-inc.com(127.0.0.1); Tue, 07 Jul 2020 19:47:19 +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 Cc: Alex Shi Subject: [PATCH v15 06/21] mm/thp: clean up lru_add_page_tail Date: Tue, 7 Jul 2020 19:46:38 +0800 Message-Id: <1594122412-28057-7-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1594122412-28057-1-git-send-email-alex.shi@linux.alibaba.com> References: <1594122412-28057-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