Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp996043pxu; Wed, 16 Dec 2020 22:31:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJw63/Gc7Dl80RHWFV63eq0fWtn2gPmLJK9SZ8JEcLKABRj3qVX7DmqcMKOLCFS0QmPYLPhG X-Received: by 2002:a17:906:4d17:: with SMTP id r23mr35351903eju.87.1608186695160; Wed, 16 Dec 2020 22:31:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608186695; cv=none; d=google.com; s=arc-20160816; b=SsCawyrSFwt33ZLAMmgRYwSwC/6p1Ijq2dKoNr0ypUGa55VsVVGFafzHj2dpND3nGl gv+nHvxjaLQ9GS3A8xRTwr1n15aetQ/p/zxRxeMFwIAveSIIq6NUZa/+wL1f2h+oCpbS 7s2Mcu2vSJVd67JtR+t2vCfMbrDptO2g78+AnrChdPr8eaxIbsqclj1RCIjrHw3Fgg6U jG3kf0Lv1Cjx186tUhwb0ns8p8id+dcvrIjAjXs+a94KCkgwqZrFdrTdbKBLeAVLzkGW mSnFLi/BC+WnnSwrgAKQal939spFsvoF/1qeYMDFJcpT4ZaI7VQSi+u6zaZqouDgbdoF HG0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=p6tcb3+d4mKLORxCnPe7UX64LOF57cPvHCaHogCkMBo=; b=ibXyLEIRgNHLfH4awXFqwXVLGpXE0qhvnlj2dePOo5eBNeZKWVH8Iyfb/ZGNu/FLwk O82XzU+d8hecXhakNZskRdv9Q1nLfMO2AFcmljzfJ98xi3pVdpgYPzCeZ0kHmRXtkABO g62bBDGdiTQUa1fnVln28j9OIhDXeuBh7kw37/cBzErVvlCw/KtVBJKYPyPNQvAGLPTp XeEamJOSyP9iyCf/kCiOAHnEBfkbvy+DW0V56ObcIr+waWnN0b5xCckqLLfJ2b1KZXc9 dA7Gxl2D5oCjEmdF+fHzz9fcKwJwIxQGmqIWzRWoEi1m6pQxbuFljn32ILFJX0qjcaS7 lCng== 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 u32si3738837edc.94.2020.12.16.22.31.12; Wed, 16 Dec 2020 22:31:35 -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; 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 S1726998AbgLQG3o (ORCPT + 99 others); Thu, 17 Dec 2020 01:29:44 -0500 Received: from out30-44.freemail.mail.aliyun.com ([115.124.30.44]:34243 "EHLO out30-44.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725930AbgLQG3o (ORCPT ); Thu, 17 Dec 2020 01:29:44 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UItliQ7_1608186540; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UItliQ7_1608186540) by smtp.aliyun-inc.com(127.0.0.1); Thu, 17 Dec 2020 14:29:01 +0800 From: Alex Shi To: akpm@linux-foundation.org Cc: Hugh Dickins , Johannes Weiner , Michal Hocko , Vladimir Davydov , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] mm/memcg: revise the using condition of lock_page_lruvec function series Date: Thu, 17 Dec 2020 14:28:50 +0800 Message-Id: <1608186532-81218-1-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The series function could be used under lock_page_memcg(), add this and a bit style changes following commit_charge(). Signed-off-by: Alex Shi Cc: Hugh Dickins 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b80328f52fb4..e6b50d068b2f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1345,10 +1345,11 @@ void lruvec_memcg_debug(struct lruvec *lruvec, struct page *page) * lock_page_lruvec - lock and return lruvec for a given page. * @page: the page * - * This series functions should be used in either conditions: - * PageLRU is cleared or unset - * or page->_refcount is zero - * or page is locked. + * This series functions should be used in any one of following conditions: + * - PageLRU is cleared or unset + * - page->_refcount is zero + * - page is locked. + * - lock_page_memcg() */ struct lruvec *lock_page_lruvec(struct page *page) { -- 2.29.GIT