Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5223749pxu; Tue, 22 Dec 2020 11:18:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzoVQvc/a/v0UPQ1CpGae7x4ztSvPzijSvJYhj0Kly1aZrJ1r2nEtMwG9ZJOBaLq7jGFJLY X-Received: by 2002:a17:906:2755:: with SMTP id a21mr15629334ejd.374.1608664697416; Tue, 22 Dec 2020 11:18:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608664697; cv=none; d=google.com; s=arc-20160816; b=ux4RpACh9MyssJmXBcQoaUOvcFX2klNyK9uGB8KnazTudaVqA/FP/uZBys6XIc/lt9 d6sX9PkN2qaPRuxuOZomZHv6F3K5pjRTqQnGHT0jzDkySiJ2NBhBWGIcyHUWEWDxQQyQ CyJWRgVbXAUZLi3OQGyOhlk7oT2IOdnRdClNaU9i/llNIrXX6zPn2ouGxCDA3S+a0HvR FiaY7Dj8tB12DLPw/xyHXrCkO+mbSXhs6hauVXyEX7wO26NR3He1SYLXbDjKO15gLOzj +nwnWRfh2dXo1/B9pB65il31OzD1sCSCjUfSp0dZsB1H0vhhWPqMzGiuGVq6SJNo1wIc iVaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=580OwNj9VQTuck9gYalATYntiA58Tf9ffgntFB1gstw=; b=a84skSx4v4GisqHAwM8Ri8zaEERqrl5zSzHrN3a1vei4sBnp1Mxsuchybpvi/pwfkk 2Z6N4Tccxw8pEDItocgvFK2OPW5UG05L8wFsluRGyquHDgToSNkVkpvlWLm5HGTv3+1N hbo3OYv3/ShMCaaUIiPhuzVbft58LVwGuLBbERC7MHa8SyL7LNxpsQ7n61dHQTZC6zLV o9bSu/KiZrWIBU2Gwl4v0HjXNaaFUqL6sefu6EOUNGjoHHFUCk92H/WBI78L5LeOxcQb 2p0rBGmPvzDcKDibsxudKXeaX/6o/pgofeGIBzeJgFq8kDwk/BlNenpFX6rZ+zvPhdOO jzuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=HOE4Taje; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g24si6943598edu.156.2020.12.22.11.17.53; Tue, 22 Dec 2020 11:18:17 -0800 (PST) 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; dkim=pass header.i=@163.com header.s=s110527 header.b=HOE4Taje; 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=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbgLVTQh (ORCPT + 99 others); Tue, 22 Dec 2020 14:16:37 -0500 Received: from m12-12.163.com ([220.181.12.12]:48995 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727554AbgLVTQg (ORCPT ); Tue, 22 Dec 2020 14:16:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:Message-ID:MIME-Version; bh=580Ow Nj9VQTuck9gYalATYntiA58Tf9ffgntFB1gstw=; b=HOE4TajeV3EHosIXZ8/UX gTvu3dQ6R3ZWF8I3IjuFWlf8CTrtAqiCZhP7HsFltCK7I3GnFA7TO+k3wraWF0V1 a8ZaSKgJJ6jFqCUv14XqZG3hJ/bwHr3vhaPm4kef4eDxmeAg+Qel0cNIw0ryB7tD nwj2nVLKyDB9xjkywJJxJo= Received: from localhost (unknown [101.86.213.121]) by smtp8 (Coremail) with SMTP id DMCowADHMNyXOuJfSqqNIQ--.57720S2; Wed, 23 Dec 2020 02:27:35 +0800 (CST) Date: Wed, 23 Dec 2020 02:27:35 +0800 From: sh To: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: sh_def@163.com Subject: [PATCH] mm/page_reporting: use list_entry_is_head() in page_reporting_cycle() Message-ID: <20201222182735.GA1257912@ubuntu-A520I-AC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CM-TRANSID: DMCowADHMNyXOuJfSqqNIQ--.57720S2 X-Coremail-Antispam: 1Uf129KBjvdXoWruFWfJw1fXF1kWr1xuw45Jrb_yoW3Arc_u3 yI93WkWrnxtrs29r1UA3WfKFnxJw4UCr4fJr4xtF1rtryUGrs8WFZ5AwnI9rW3WrW3u343 uw1DXFy7ur17XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbFAp7UUUUU== X-Originating-IP: [101.86.213.121] X-CM-SenderInfo: xvkbvvri6rljoofrz/xtbBDhgDX1rbLou8CQAAsb Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.25.1