From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B03CFC433E0 for ; Tue, 29 Dec 2020 09:16:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 1B6E7207CF for ; Tue, 29 Dec 2020 09:16:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B6E7207CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6F4986B0088; Tue, 29 Dec 2020 04:16:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A5618D0018; Tue, 29 Dec 2020 04:16:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5BA726B0092; Tue, 29 Dec 2020 04:16:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 491196B0088 for ; Tue, 29 Dec 2020 04:16:32 -0500 (EST) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 103E298B0 for ; Tue, 29 Dec 2020 09:16:32 +0000 (UTC) X-FDA: 77645764224.08.brush01_3a130262749b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id EB4A71819E769 for ; Tue, 29 Dec 2020 09:16:31 +0000 (UTC) X-HE-Tag: brush01_3a130262749b X-Filterd-Recvd-Size: 3188 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf49.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Dec 2020 09:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1609233390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xRqi06XLW/oYwq/HT/wMRGGZLkj3eNNLdOVuy8LBVMM=; b=J7ILyxzLEYKjUsSSLqiqeTS+9iPOp+vhLlhu++8dMcJY+4Uxx8bWKkr9rcEdad4z8AK0JU Aojl5kkKp1zF82jBwwv0wlHZv3tJOucM4DNO40u/HeFSXC22mtp0sJllTHZqH5v7T4/g28 lGj4YKLoUEqgC1hWdsFKwMwVkg+1O+0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-445-CvrpukNGPGqFpyGDVU8HrA-1; Tue, 29 Dec 2020 04:16:28 -0500 X-MC-Unique: CvrpukNGPGqFpyGDVU8HrA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 323B01005E62; Tue, 29 Dec 2020 09:16:27 +0000 (UTC) Received: from [10.36.112.131] (ovpn-112-131.ams2.redhat.com [10.36.112.131]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5484F1349A; Tue, 29 Dec 2020 09:16:26 +0000 (UTC) Subject: Re: [PATCH] mm/page_reporting: use list_entry_is_head() in page_reporting_cycle() To: sh , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20201222182735.GA1257912@ubuntu-A520I-AC> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <3897f709-3bc8-2204-5e85-09790779e292@redhat.com> Date: Tue, 29 Dec 2020 10:16:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201222182735.GA1257912@ubuntu-A520I-AC> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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: On 22.12.20 19:27, sh wrote: > replace '&next->lru != list' with list_entry_is_head(). > No functional change. > > Signed-off-by: sh > --- > mm/page_reporting.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/page_reporting.c b/mm/page_reporting.c > index cd8e13d41df4..c50d93ffa252 100644 > --- a/mm/page_reporting.c > +++ b/mm/page_reporting.c > @@ -211,7 +211,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, > } > > /* Rotate any leftover pages to the head of the freelist */ > - if (&next->lru != list && !list_is_first(&next->lru, list)) > + if (!list_entry_is_head(next, list, lru) && !list_is_first(&next->lru, list)) > list_rotate_to_front(&next->lru, list); > > spin_unlock_irq(&zone->lock); > LGTM Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb