From patchwork Fri Nov 20 09:35:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 11919787 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=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED, USER_AGENT_GIT 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 42B65C63777 for ; Fri, 20 Nov 2020 09:35:44 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B4C9E22227 for ; Fri, 20 Nov 2020 09:35:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B4C9E22227 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 027606B0073; Fri, 20 Nov 2020 04:35:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F1A136B0075; Fri, 20 Nov 2020 04:35:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E56066B007D; Fri, 20 Nov 2020 04:35:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0112.hostedemail.com [216.40.44.112]) by kanga.kvack.org (Postfix) with ESMTP id A52A46B0073 for ; Fri, 20 Nov 2020 04:35:42 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 3C5E78249980 for ; Fri, 20 Nov 2020 09:35:42 +0000 (UTC) X-FDA: 77504289324.28.coat58_4909a4c2734a Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 0DF966C3E for ; Fri, 20 Nov 2020 09:35:42 +0000 (UTC) X-HE-Tag: coat58_4909a4c2734a X-Filterd-Recvd-Size: 2097 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by imf07.hostedemail.com (Postfix) with ESMTP for ; Fri, 20 Nov 2020 09:35:40 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R551e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0UFykla5_1605864932; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UFykla5_1605864932) by smtp.aliyun-inc.com(127.0.0.1); Fri, 20 Nov 2020 17:35:32 +0800 From: Alex Shi To: Cc: Johannes Weiner , Michal Hocko , Vladimir Davydov , Andrew Morton , cgroups@vger.kernel.org , linux-mm@kvack.org , linux-kernel@vger.kernel.org Subject: [PATCH next-akpm] mm/memcg: remove incorrect comments Date: Fri, 20 Nov 2020 17:35:30 +0800 Message-Id: <1605864930-49405-1-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 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: Swapcache readahead pages are charged before get used, so it unlikely be migrated before charged. remove the incorrect comments. Signed-off-by: Alex Shi Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Andrew Morton Cc: cgroups@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- mm/memcontrol.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 45465c03a8d7..08c267305725 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6941,7 +6941,6 @@ void mem_cgroup_migrate(struct page *oldpage, struct page *newpage) if (page_memcg(newpage)) return; - /* Swapcache readahead pages can get replaced before being charged */ memcg = page_memcg(oldpage); VM_WARN_ON_ONCE_PAGE(!memcg, oldpage); if (!memcg)