From: Levi Yun <ppbuk5246@gmail.com>
To: Liam.Howlett@oracle.com
Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Levi Yun <ppbuk5246@gmail.com>
Subject: [PATCH] maple_tree: remove mast_overflow.
Date: Sat, 11 Nov 2023 11:04:17 +0000 [thread overview]
Message-ID: <20231111110417.38655-1-ppbuk5246@gmail.com> (raw)
mast_overflow is used only in mas_spanning_rebalance.
But when mast_sufficient is false, mast_overflow always returns false,
and when mast_suffictent is true, it never reaches to mast_overflow in
mas_spanning_rebalance.
Therefore, mast_overflow is dead code in mas_spanning_rebalance.
And there is no other usage of mast_overflow execpt
mas_spanning_rebalance, Remove mast_overflow.
Signed-off-by: Levi Yun <ppbuk5246@gmail.com>
---
lib/maple_tree.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/lib/maple_tree.c b/lib/maple_tree.c
index bb24d84a4922..1e591e71621e 100644
--- a/lib/maple_tree.c
+++ b/lib/maple_tree.c
@@ -2767,19 +2767,6 @@ static inline bool mast_sufficient(struct maple_subtree_state *mast)
return false;
}
-/*
- * mast_overflow: Check if there is too much data in the subtree state for a
- * single node.
- * @mast: The maple subtree state
- */
-static inline bool mast_overflow(struct maple_subtree_state *mast)
-{
- if (mast->bn->b_end >= mt_slot_count(mast->orig_l->node))
- return true;
-
- return false;
-}
-
static inline void *mtree_range_walk(struct ma_state *mas)
{
unsigned long *pivots;
@@ -2934,9 +2921,6 @@ static int mas_spanning_rebalance(struct ma_state *mas,
if (mast_sufficient(mast))
continue;
- if (mast_overflow(mast))
- continue;
-
/* May be a new root stored in mast->bn */
if (mas_is_root_limits(mast->orig_l))
break;
--
2.41.0
next reply other threads:[~2023-11-11 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-11 11:04 Levi Yun [this message]
2023-11-12 15:29 ` Liam R. Howlett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231111110417.38655-1-ppbuk5246@gmail.com \
--to=ppbuk5246@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maple-tree@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox