summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-05-17 00:00:33 +0200
committerMatthew Wilcox <willy@infradead.org>2018-10-21 16:46:34 +0200
commit3ece58a270cd1e5026282abe778bd50db7a11d08 (patch)
treeed4feeec0489b4fa9e513e8817363944da48dd3d /tools/testing
parentpage cache: Convert find_get_pages_range to XArray (diff)
downloadlinux-3ece58a270cd1e5026282abe778bd50db7a11d08.tar.xz
linux-3ece58a270cd1e5026282abe778bd50db7a11d08.zip
page cache: Convert find_get_pages_contig to XArray
There's no direct replacement for radix_tree_for_each_contig() in the XArray API as it's an unusual thing to do. Instead, open-code a loop using xas_next(). This removes the only user of radix_tree_for_each_contig() so delete the iterator from the API and the test suite code for it. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/radix-tree/regression3.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/testing/radix-tree/regression3.c b/tools/testing/radix-tree/regression3.c
index ace2543c3eda..9f9a3b280f56 100644
--- a/tools/testing/radix-tree/regression3.c
+++ b/tools/testing/radix-tree/regression3.c
@@ -69,21 +69,6 @@ void regression3_test(void)
continue;
}
}
- radix_tree_delete(&root, 1);
-
- first = true;
- radix_tree_for_each_contig(slot, &root, &iter, 0) {
- printv(2, "contig %ld %p\n", iter.index, *slot);
- if (first) {
- radix_tree_insert(&root, 1, ptr);
- first = false;
- }
- if (radix_tree_deref_retry(*slot)) {
- printv(2, "retry at %ld\n", iter.index);
- slot = radix_tree_iter_retry(&iter);
- continue;
- }
- }
radix_tree_for_each_slot(slot, &root, &iter, 0) {
printv(2, "slot %ld %p\n", iter.index, *slot);
@@ -93,14 +78,6 @@ void regression3_test(void)
}
}
- radix_tree_for_each_contig(slot, &root, &iter, 0) {
- printv(2, "contig %ld %p\n", iter.index, *slot);
- if (!iter.index) {
- printv(2, "next at %ld\n", iter.index);
- slot = radix_tree_iter_resume(slot, &iter);
- }
- }
-
radix_tree_tag_set(&root, 0, 0);
radix_tree_tag_set(&root, 1, 0);
radix_tree_for_each_tagged(slot, &root, &iter, 0, 0) {