mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Cong Wang <xiyou.wangcong@gmail.com>
Subject: [PATCH 3/5] radix tree: Remove radix_tree_iter_find
Date: Sun,  3 Nov 2019 03:40:09 -0800	[thread overview]
Message-ID: <20191103114012.30027-4-willy@infradead.org> (raw)
In-Reply-To: <20191103114012.30027-1-willy@infradead.org>

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

This API is unsafe to use under the RCU lock.  With no in-tree users
remaining, remove it to prevent future bugs.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 include/linux/radix-tree.h | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index b5116013f27e..63e62372443a 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -315,24 +315,6 @@ radix_tree_iter_lookup(const struct radix_tree_root *root,
 	return radix_tree_next_chunk(root, iter, RADIX_TREE_ITER_CONTIG);
 }
 
-/**
- * radix_tree_iter_find - find a present entry
- * @root: radix tree root
- * @iter: iterator state
- * @index: start location
- *
- * This function returns the slot containing the entry with the lowest index
- * which is at least @index.  If @index is larger than any present entry, this
- * function returns NULL.  The @iter is updated to describe the entry found.
- */
-static inline void __rcu **
-radix_tree_iter_find(const struct radix_tree_root *root,
-			struct radix_tree_iter *iter, unsigned long index)
-{
-	radix_tree_iter_init(iter, index);
-	return radix_tree_next_chunk(root, iter, 0);
-}
-
 /**
  * radix_tree_iter_retry - retry this chunk of the iteration
  * @iter:	iterator state
-- 
2.24.0.rc1


  parent reply	other threads:[~2019-11-03 11:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-03 11:40 [PATCH 0/5] Misc XArray, IDR & Radix Tree patches Matthew Wilcox
2019-11-03 11:40 ` [PATCH 1/5] XArray: Fix xas_next() with a single entry at 0 Matthew Wilcox
2019-11-03 11:40 ` [PATCH 2/5] idr: Fix idr_get_next_ul race with idr_remove Matthew Wilcox
2019-11-03 11:40 ` Matthew Wilcox [this message]
2019-11-03 11:40 ` [PATCH 4/5] idr: Fix integer overflow in idr_for_each_entry Matthew Wilcox
2019-11-03 11:40 ` [PATCH 4/5] idr: Handle integer overflow correctly Matthew Wilcox
2019-11-03 11:41   ` Matthew Wilcox
2019-11-03 11:40 ` [PATCH 5/5] idr: Fix idr_alloc_u32 on 32-bit systems Matthew Wilcox

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=20191103114012.30027-4-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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

all inboxes | Powered by JetHome®