Message ID | 20240125081423.1200336-1-yosryahmed@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-38144-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1490866dyi; Thu, 25 Jan 2024 00:14:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IE74jSRW+jkZr1B0L6AjHnaLzJguILw6n3lZ89xYNbd7KxcOXDGU4zxVfe3HAVEGLeL1Ouk X-Received: by 2002:a17:907:c28b:b0:a31:1cf8:404f with SMTP id tk11-20020a170907c28b00b00a311cf8404fmr301843ejc.94.1706170497315; Thu, 25 Jan 2024 00:14:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706170497; cv=pass; d=google.com; s=arc-20160816; b=NTPs6GhQaokUJGf2SH4By7Fv3uiyOTSOJE/HNnsDyc7+DoskU0MH+TVrQLjPrUqhm1 08oXzGW30NwXroCJYziRJTGXXNEsxS5R01g6C/6NdN2xxoXIXDNQ1DGm0nSMNBUkU8wX L9WnfBEu/tGudSAtBrjw6thVVo5J/dgbd8Myllimixgm4PqAs36oxrzfhUhbIHrlmzbz vFX3gbNnZ5MdOcDWm/mYsbETtZs0hud/BUu6Xtjzaz/kNsXbjz9YzilvsKoIe27t6Jio V6CWcliClXGYBs97naNGEhYmY9dB2ENsVavPC5y2CueNYAwC3GvUdTvjc/XORi9Q3LEx tQHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=TTmwN8C5xYYKtz8HRfXOUdRFW/9rByTcl8wDVg46w14=; fh=Cp91NEGKP3IC1/Y8tj2MDn6DnOv4Wu0w1VZb+WLuDkc=; b=kvNb/F3ITcW45dJjJNK4Teu82mDdIUQMsrjxBW7VbVc64ipz+qKpE635k6y+vxWPc/ gzljtFbp0lfv91o9Or4aDi//9IymJOhPqwwjzThqAS77eKLFDEr2ejkrTdafConf2UgC xCoJJqTfFIut02YXDSvosVoDDUlngO0iCJ1rUgYKM8txr9TIhHc52RrekC/mtaHZV+Eu pdzHqmW3TOya0JNbBh9MjU7MTlZM8W8CW2sh1H9FH8p6mOaxSIQwY1lLQw4Nl93x1wpv UobzssAYLmBsYJ8L8bxI6ZstcoimfHmkNbYiO6kOkyCd8cHZl6w8iwkEmdqLne4TEO8k Qg8Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jM5+VJCW; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-38144-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38144-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lz23-20020a170906fb1700b00a31324871d1si695275ejb.333.2024.01.25.00.14.57 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 00:14:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-38144-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=jM5+VJCW; arc=pass (i=1 spf=pass spfdomain=flex--yosryahmed.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-38144-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-38144-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E77741F2178F for <ouuuleilei@gmail.com>; Thu, 25 Jan 2024 08:14:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 78CE41772D; Thu, 25 Jan 2024 08:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jM5+VJCW" Received: from mail-yb1-f202.google.com (mail-yb1-f202.google.com [209.85.219.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71D4917588 for <linux-kernel@vger.kernel.org>; Thu, 25 Jan 2024 08:14:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170467; cv=none; b=OW+51UK6tKpm5ppEVjvR0R9i/tNewwR64yjIOTErRr8WkuTzcjEkHkkhk0PlSDPjfARYMkZDQH925rwDX797In40xJ3BqciOcxHWf3ozBod8X2bOYYdrS6wNkubGirkPnpJwYj6cNwlFpI1geJJHTgVcAeSYUyaNfqoqcg1Eqdc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706170467; c=relaxed/simple; bh=JaR4jvVKPHNgoMUjvN9Fx0qi2/jFA8uL0LDZS34O6wg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=EnOtt8qmBrxfX0mVeRpeXp8hGZfuMHtQDm302LBXLJmPX+wUodIYC1CSZrZSdk2Xm0aGyAw0XbcFd4REm0bqREe9dEvCEzfApqRLPRxFzIuFRe3PYKkoj2TkiZS7g2/Jy6ox31VUKkKehKMoDKoJjRqLLeDc45pBSv5U/VnuZ3I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=jM5+VJCW; arc=none smtp.client-ip=209.85.219.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--yosryahmed.bounces.google.com Received: by mail-yb1-f202.google.com with SMTP id 3f1490d57ef6-dbdb46770d7so9482256276.1 for <linux-kernel@vger.kernel.org>; Thu, 25 Jan 2024 00:14:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1706170465; x=1706775265; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=TTmwN8C5xYYKtz8HRfXOUdRFW/9rByTcl8wDVg46w14=; b=jM5+VJCW1Rq81Cu5tQR1mCKGkl76sVvWnla8eBTnCQ8D5U69C8Ps009ItF/Uqajr2T BKfmbtNVg+MiQ6FqEWi2itmk+cz2/sVSxLQ9TGOUaRgByXASzdKApjchG+QeHVddC8IP pzhC/sQeqf4xApxHBAW6Yk2zPXxtwhuJOtRCBKJhmaESuhY0dc6LJIfc5emSwCOQIcva BNJtybGKbQ2PyA6ogssHy4wmjE2fJoiEjyfm3V74hUPPWgmIOQ+s4S++xTQ1Yt67qKK5 mKWaLhJ8BM5GNUExJZ08TeNciT5ml98AFRBX/O3vMhHnpP6q5mO1NuoxAwmzDrRGnaGc x6xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706170465; x=1706775265; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TTmwN8C5xYYKtz8HRfXOUdRFW/9rByTcl8wDVg46w14=; b=h+kR+ClpI6BjDHi+woIQPqk+HCjA60TcXFyLGhFZjdQgD04MRSBFLcHIcHPfetCOr5 1jJ/JKux7FF/NevbeuXEJI37PGfvt3PSW7vM5UgZRb2bMvPirqply3SHBR56EZo0IdDR 30cnGAPgjP6oBWOxY7RuwWEyBDKxjMTSBac6VggL52NVbLMQU1621DVfqefGhttbMZPt C0qooexs80UOwkIWQkHPQl3i9wVhTJQmJ4+EbjnW80sT2OY7zbfZkqWF45yyFtpg6e5K IJgXz7QanzwMsJ/Z3rBJ44z+y/7MLbZ6D7QeWqOnS8pC1PI3Jp6EyWAElMOTMH22MZq5 oxiw== X-Gm-Message-State: AOJu0YzZbzlw1uJfTCmpKn/cWSyjYdpsJU1a2pAzV5I1fOPgk0blOsdp 60nprKbOvbF2Bx0Aa9ftDicoXZWXOoEBFOZril8jhmQ08/oHyKfIMpV2u+0LG923rp404fiZ6mF gxTT+r0zHJpOYGn+1Jw== X-Received: from yosry.c.googlers.com ([fda3:e722:ac3:cc00:20:ed76:c0a8:29b4]) (user=yosryahmed job=sendgmr) by 2002:a05:6902:2303:b0:dc2:1f3b:abdd with SMTP id do3-20020a056902230300b00dc21f3babddmr340427ybb.5.1706170465455; Thu, 25 Jan 2024 00:14:25 -0800 (PST) Date: Thu, 25 Jan 2024 08:14:23 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Message-ID: <20240125081423.1200336-1-yosryahmed@google.com> Subject: [PATCH] mm: zswap: remove unused tree argument in zswap_entry_put() From: Yosry Ahmed <yosryahmed@google.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Johannes Weiner <hannes@cmpxchg.org>, Nhat Pham <nphamcs@gmail.com>, Chengming Zhou <zhouchengming@bytedance.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yosry Ahmed <yosryahmed@google.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789049435293318105 X-GMAIL-MSGID: 1789049435293318105 |
Series |
mm: zswap: remove unused tree argument in zswap_entry_put()
|
|
Commit Message
Yosry Ahmed
Jan. 25, 2024, 8:14 a.m. UTC
Commit 7310895779624 ("mm: zswap: tighten up entry invalidation")
removed the usage of tree argument, delete it.
Signed-off-by: Yosry Ahmed <yosryahmed@google.com>
---
mm/zswap.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Comments
On 2024/1/25 16:14, Yosry Ahmed wrote: > Commit 7310895779624 ("mm: zswap: tighten up entry invalidation") > removed the usage of tree argument, delete it. > > Signed-off-by: Yosry Ahmed <yosryahmed@google.com> LGTM, thanks! Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com> > --- > mm/zswap.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/mm/zswap.c b/mm/zswap.c > index 78df16d307aa8..8f4a7efc2bdae 100644 > --- a/mm/zswap.c > +++ b/mm/zswap.c > @@ -569,8 +569,7 @@ static void zswap_entry_get(struct zswap_entry *entry) > /* caller must hold the tree lock > * remove from the tree and free it, if nobody reference the entry > */ > -static void zswap_entry_put(struct zswap_tree *tree, > - struct zswap_entry *entry) > +static void zswap_entry_put(struct zswap_entry *entry) > { > int refcount = --entry->refcount; > > @@ -853,7 +852,7 @@ static void zswap_invalidate_entry(struct zswap_tree *tree, > struct zswap_entry *entry) > { > if (zswap_rb_erase(&tree->rbroot, entry)) > - zswap_entry_put(tree, entry); > + zswap_entry_put(entry); > } > > static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_one *l, > @@ -924,7 +923,7 @@ static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_o > > put_unlock: > /* Drop local reference */ > - zswap_entry_put(tree, entry); > + zswap_entry_put(entry); > unlock: > spin_unlock(&tree->lock); > spin_lock(lock); > @@ -1754,7 +1753,7 @@ bool zswap_load(struct folio *folio) > zswap_lru_del(&entry->pool->list_lru, entry); > zswap_lru_add(&entry->pool->list_lru, entry); > } > - zswap_entry_put(tree, entry); > + zswap_entry_put(entry); > spin_unlock(&tree->lock); > > return true;
On Thu, Jan 25, 2024 at 08:14:23AM +0000, Yosry Ahmed wrote: > Commit 7310895779624 ("mm: zswap: tighten up entry invalidation") > removed the usage of tree argument, delete it. > > Signed-off-by: Yosry Ahmed <yosryahmed@google.com> Beat me to it :) Acked-by: Johannes Weiner <hannes@cmpxchg.org>
On Thu, Jan 25, 2024 at 12:14 AM Yosry Ahmed <yosryahmed@google.com> wrote: > > Commit 7310895779624 ("mm: zswap: tighten up entry invalidation") > removed the usage of tree argument, delete it. > > Signed-off-by: Yosry Ahmed <yosryahmed@google.com> > --- > mm/zswap.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > > diff --git a/mm/zswap.c b/mm/zswap.c > index 78df16d307aa8..8f4a7efc2bdae 100644 > --- a/mm/zswap.c > +++ b/mm/zswap.c > @@ -569,8 +569,7 @@ static void zswap_entry_get(struct zswap_entry *entry) > /* caller must hold the tree lock > * remove from the tree and free it, if nobody reference the entry > */ > -static void zswap_entry_put(struct zswap_tree *tree, > - struct zswap_entry *entry) > +static void zswap_entry_put(struct zswap_entry *entry) > { > int refcount = --entry->refcount; > > @@ -853,7 +852,7 @@ static void zswap_invalidate_entry(struct zswap_tree *tree, > struct zswap_entry *entry) > { > if (zswap_rb_erase(&tree->rbroot, entry)) > - zswap_entry_put(tree, entry); > + zswap_entry_put(entry); > } > > static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_one *l, > @@ -924,7 +923,7 @@ static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_o > > put_unlock: > /* Drop local reference */ > - zswap_entry_put(tree, entry); > + zswap_entry_put(entry); > unlock: > spin_unlock(&tree->lock); > spin_lock(lock); > @@ -1754,7 +1753,7 @@ bool zswap_load(struct folio *folio) > zswap_lru_del(&entry->pool->list_lru, entry); > zswap_lru_add(&entry->pool->list_lru, entry); > } > - zswap_entry_put(tree, entry); > + zswap_entry_put(entry); > spin_unlock(&tree->lock); > > return true; > -- > 2.43.0.429.g432eaa2c6b-goog > Reviewed-by: Nhat Pham <nphamcs@gmail.com>
diff --git a/mm/zswap.c b/mm/zswap.c index 78df16d307aa8..8f4a7efc2bdae 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -569,8 +569,7 @@ static void zswap_entry_get(struct zswap_entry *entry) /* caller must hold the tree lock * remove from the tree and free it, if nobody reference the entry */ -static void zswap_entry_put(struct zswap_tree *tree, - struct zswap_entry *entry) +static void zswap_entry_put(struct zswap_entry *entry) { int refcount = --entry->refcount; @@ -853,7 +852,7 @@ static void zswap_invalidate_entry(struct zswap_tree *tree, struct zswap_entry *entry) { if (zswap_rb_erase(&tree->rbroot, entry)) - zswap_entry_put(tree, entry); + zswap_entry_put(entry); } static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_one *l, @@ -924,7 +923,7 @@ static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_o put_unlock: /* Drop local reference */ - zswap_entry_put(tree, entry); + zswap_entry_put(entry); unlock: spin_unlock(&tree->lock); spin_lock(lock); @@ -1754,7 +1753,7 @@ bool zswap_load(struct folio *folio) zswap_lru_del(&entry->pool->list_lru, entry); zswap_lru_add(&entry->pool->list_lru, entry); } - zswap_entry_put(tree, entry); + zswap_entry_put(entry); spin_unlock(&tree->lock); return true;