Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3383649pxb; Sun, 7 Feb 2021 07:30:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVP4+P7aoKQBTDaEUDdqlpzs1k22SHxHW8av9SSFv0VmqD38womphOrtRoEdILZEoNvNqs X-Received: by 2002:a05:6402:306c:: with SMTP id bs12mr13024842edb.348.1612711827041; Sun, 07 Feb 2021 07:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612711827; cv=none; d=google.com; s=arc-20160816; b=ycdS4I2IP3X7lD/89/ZOIdRzibrl9J8OGl1U7nkntDWjVyWlZfmAWFzW9lmmdF8WG7 FIZjBwqG+4moydONcpUkV1ynPk0tdAfGSstlhOJQEpm4eqF2GgPEnjdwRhlakkmOlDh2 fB9401QAdqjPTn3UCaIyRZ76f8uQC1Ob+/QpT5xLE6/8q9LhtVxq1J4g9UJr4OCPATbE oJDqG6Yt/iOBdE4Tv3hlkuwOe5LGe9ahFv4d5BhCJ1yUWIoP9dtPINFRb+XtfRy9SRN+ U4auYS5gcNBkvce3D7zN07zTluQigirfvEHJxC1Zy999MimVBSwqj3ELoxB4EEAvoJNp hTbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :sender:dkim-signature; bh=LwrzzUOqvk7nQXNMsXvC9PLN9Jy02gm7UHyjOCvTH/w=; b=dPci4xoDKNqdkFoZkFkRG7GarMAFTh994l8u3cKkonCEhIqdAoSRCydZV5nBXKeJJl Ca0d0BOQXj9/rTpPyn2X0OW8m6SrkmBomwVtkVR0ofqYTtcj3TfrQCbrzc4vBolvnL7P lOJSk2smXKKP7bAwacmFzYPFn4aCeUBZI1Y7G9C1nMEuf+8l1u4TVR77MX6+egWFyRDm PWVbM1QWHnlm2wmMvLnpFg3sDExdFONTqr9PBYndYRpK0Hl7aSfzEUpqTyq+7dV+lho1 hrVHbEahcu3iIV4a2dqstJUY8hltx4r6xPgmlOJid8fup3yb+ImrQCZiMD1z6t5Tx/kX QJdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qPmlvXJS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b63si10337544edf.480.2021.02.07.07.30.03; Sun, 07 Feb 2021 07:30:27 -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=@google.com header.s=20161025 header.b=qPmlvXJS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230221AbhBGP1W (ORCPT + 99 others); Sun, 7 Feb 2021 10:27:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230357AbhBGPXE (ORCPT ); Sun, 7 Feb 2021 10:23:04 -0500 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92628C061756 for ; Sun, 7 Feb 2021 07:22:02 -0800 (PST) Received: by mail-pg1-x549.google.com with SMTP id f4so8952714pgk.19 for ; Sun, 07 Feb 2021 07:22:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=LwrzzUOqvk7nQXNMsXvC9PLN9Jy02gm7UHyjOCvTH/w=; b=qPmlvXJSc8bIT6hbfFnv1+yDNzerJMSANr63wbcNfBh43VbJiYiAxQvI7xw+iJnMl5 d0GZRjEC/sOJiBr1patZSeDTTwK5Dcjvr4Qf6PLHgLo1Pq+Gp3EOVVmcbZIrJAe7Bqr7 Ny10J+rVytml1qdMeHYSD33XQY7M3/Jo7m6OPh7wZVyuaM+5Xrun86IY29p5M+iA/J98 b6af/ohF1+RaDhlmrCX5J3wH/d423U5pxEQFrTzPy8kGa0XKm4n912W65Oa5qV90gZRq xC45SIIklGT5mSngAfGK1wUPHagYKZ3hHRbx+yrSPQxyXe6Pu2Q/VgpnDDh+Yb58x4xE AxKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=LwrzzUOqvk7nQXNMsXvC9PLN9Jy02gm7UHyjOCvTH/w=; b=WGJjWt/SxKixnxI6GrxA6NqAWMo+U6F0U0AQov9SpcgtAnpBWDhisKnst6OPZBT7ZO IKGCk/lR+UnBae8HgUa1sprSQHR035YzRfhMYh9uDFXHTUg7rAB5lQo2wcJm+TUzBEPt 6C7jI8050kw9g5MknF55buo2X9BkfQlCRkLPNEoi4iS6KdAY6ikk7WT+JEu0UhpWRgpA TO9KdmC7xNPI9b4rSr6AiFWrZlW+PNMsvE/DfR9b7EAHCz7E0eykcL7PWYPyKkNBYrrY LjtULbl5fSfEDLoaAI4AiteMI6FpMwR89R6wgak+2SZw8PAL/J0vbw0c1BjsgfqCzzNR 5xeA== X-Gm-Message-State: AOAM5316WCnLnpcs16KuXP9UbOyfMNZqr6B6VsURh7t2f+h43ORfBH7l +7lDfpzgDkakd9gML30RCsGJS4j2AKKmvQ== Sender: "shakeelb via sendgmr" X-Received: from shakeelb.svl.corp.google.com ([2620:15c:2cd:202:193e:fc7f:b382:cc9f]) (user=shakeelb job=sendgmr) by 2002:a17:90a:780c:: with SMTP id w12mr8190290pjk.135.1612711321765; Sun, 07 Feb 2021 07:22:01 -0800 (PST) Date: Sun, 7 Feb 2021 07:21:48 -0800 Message-Id: <20210207152148.1285842-1-shakeelb@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH] mm/list_lru.c: remove kvfree_rcu_local() From: Shakeel Butt To: Uladzislau Rezki , "Paul E . McKenney" , Andrew Morton Cc: Kirill Tkhai , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Shakeel Butt Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The list_lru file used to have local kvfree_rcu() which was renamed by commit e0feed08ab41 ("mm/list_lru.c: Rename kvfree_rcu() to local variant") to introduce the globally visible kvfree_rcu(). Now we have global kvfree_rcu(), so remove the local kvfree_rcu_local() and just use the global one. Signed-off-by: Shakeel Butt --- mm/list_lru.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/mm/list_lru.c b/mm/list_lru.c index fe230081690b..6f067b6b935f 100644 --- a/mm/list_lru.c +++ b/mm/list_lru.c @@ -373,21 +373,13 @@ static void memcg_destroy_list_lru_node(struct list_lru_node *nlru) struct list_lru_memcg *memcg_lrus; /* * This is called when shrinker has already been unregistered, - * and nobody can use it. So, there is no need to use kvfree_rcu_local(). + * and nobody can use it. So, there is no need to use kvfree_rcu(). */ memcg_lrus = rcu_dereference_protected(nlru->memcg_lrus, true); __memcg_destroy_list_lru_node(memcg_lrus, 0, memcg_nr_cache_ids); kvfree(memcg_lrus); } -static void kvfree_rcu_local(struct rcu_head *head) -{ - struct list_lru_memcg *mlru; - - mlru = container_of(head, struct list_lru_memcg, rcu); - kvfree(mlru); -} - static int memcg_update_list_lru_node(struct list_lru_node *nlru, int old_size, int new_size) { @@ -419,7 +411,7 @@ static int memcg_update_list_lru_node(struct list_lru_node *nlru, rcu_assign_pointer(nlru->memcg_lrus, new); spin_unlock_irq(&nlru->lock); - call_rcu(&old->rcu, kvfree_rcu_local); + kvfree_rcu(old, rcu); return 0; } -- 2.30.0.478.g8a0d178c01-goog