From patchwork Mon Aug 17 08:48:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 11717141 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C0BB1392 for ; Mon, 17 Aug 2020 08:48:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3282520758 for ; Mon, 17 Aug 2020 08:48:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3282520758 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 69C186B0005; Mon, 17 Aug 2020 04:48:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 654746B0006; Mon, 17 Aug 2020 04:48:52 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 512A26B0007; Mon, 17 Aug 2020 04:48:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0025.hostedemail.com [216.40.44.25]) by kanga.kvack.org (Postfix) with ESMTP id 355716B0005 for ; Mon, 17 Aug 2020 04:48:52 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 01CFB824556B for ; Mon, 17 Aug 2020 08:48:51 +0000 (UTC) X-FDA: 77159435304.24.toad85_1d0abf727015 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id D1A111A4A0 for ; Mon, 17 Aug 2020 08:48:51 +0000 (UTC) X-Spam-Summary: 1,0,0,79486243d1ac5bd3,d41d8cd98f00b204,richard.weiyang@linux.alibaba.com,,RULES_HIT:41:355:379:541:960:966:973:988:989:1260:1261:1311:1314:1345:1437:1515:1534:1540:1711:1714:1730:1747:1777:1792:2194:2196:2199:2200:2393:2559:2562:3138:3139:3140:3141:3142:3350:3865:3866:3871:4321:4385:5007:6261:9010:9012:10004:11026:11658:11914:12043:12294:12297:12438:12555:12895:13069:13311:13357:13894:14096:14181:14384:14394:14721:21080:21324:21627:21987:30054:30065,0,RBL:115.124.30.54:@linux.alibaba.com:.lbl8.mailshell.net-64.201.201.201 62.20.2.100;04y8na3qm7a8dp41mpwuhryq4zehqoc89ctwcp5jeh1tf4hfcuihdy6dncyrsd7.my1emfm1sjiagqp3skx441g9ecq1ektar9hkzje3tm3o3f7x455487jsg5ozaot.r-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: toad85_1d0abf727015 X-Filterd-Recvd-Size: 1936 Received: from out30-54.freemail.mail.aliyun.com (out30-54.freemail.mail.aliyun.com [115.124.30.54]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Mon, 17 Aug 2020 08:48:50 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07425;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0U6-Thdu_1597654123; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U6-Thdu_1597654123) by smtp.aliyun-inc.com(127.0.0.1); Mon, 17 Aug 2020 16:48:43 +0800 From: Wei Yang To: alexander.h.duyck@linux.intel.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH] mm/page_reporting: the "page" must not be the list head Date: Mon, 17 Aug 2020 16:48:36 +0800 Message-Id: <20200817084836.29216-1-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 X-Rspamd-Queue-Id: D1A111A4A0 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.004284, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: If "page" is the list head, list_for_each_entry_safe() would stop iteration. Signed-off-by: Wei Yang Reviewed-by: David Hildenbrand --- 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 3bbd471cfc81..aaaa3605123d 100644 --- a/mm/page_reporting.c +++ b/mm/page_reporting.c @@ -178,7 +178,7 @@ page_reporting_cycle(struct page_reporting_dev_info *prdev, struct zone *zone, * the new head of the free list before we release the * zone lock. */ - if (&page->lru != list && !list_is_first(&page->lru, list)) + if (!list_is_first(&page->lru, list)) list_rotate_to_front(&page->lru, list); /* release lock before waiting on report processing */