aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/radix-tree/tag_check.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2018-08-18 07:09:22 -0400
committerMatthew Wilcox <willy@infradead.org>2018-10-21 10:46:45 -0400
commit372266ba0267803564824b1c09f1bb7f3f3fc761 (patch)
treee0f2551f5b51b793afe4fe7edfcaf5da6fce974d /tools/testing/radix-tree/tag_check.c
parentradix tree: Remove radix_tree_clear_tags (diff)
downloadlinux-dev-372266ba0267803564824b1c09f1bb7f3f3fc761.tar.xz
linux-dev-372266ba0267803564824b1c09f1bb7f3f3fc761.zip
radix tree test suite: Convert tag_tagged_items to XArray
The tag_tagged_items() function is supposed to test the page-writeback tagging code. Since that has been converted to the XArray, there's not much point in testing the radix tree's tagging code. This requires using the pthread mutex embedded in the xarray instead of an external lock, so remove the pthread mutexes which protect xarrays/radix trees. Also remove radix_tree_iter_tag_set() as this was the last user. Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/testing/radix-tree/tag_check.c')
-rw-r--r--tools/testing/radix-tree/tag_check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/radix-tree/tag_check.c b/tools/testing/radix-tree/tag_check.c
index 56a42f1c5ab0..f898957b1a19 100644
--- a/tools/testing/radix-tree/tag_check.c
+++ b/tools/testing/radix-tree/tag_check.c
@@ -24,7 +24,7 @@ __simple_checks(struct radix_tree_root *tree, unsigned long index, int tag)
item_tag_set(tree, index, tag);
ret = item_tag_get(tree, index, tag);
assert(ret != 0);
- ret = tag_tagged_items(tree, NULL, first, ~0UL, 10, tag, !tag);
+ ret = tag_tagged_items(tree, first, ~0UL, 10, tag, !tag);
assert(ret == 1);
ret = item_tag_get(tree, index, !tag);
assert(ret != 0);
@@ -321,7 +321,7 @@ static void single_check(void)
assert(ret == 0);
verify_tag_consistency(&tree, 0);
verify_tag_consistency(&tree, 1);
- ret = tag_tagged_items(&tree, NULL, first, 10, 10, 0, 1);
+ ret = tag_tagged_items(&tree, first, 10, 10, XA_MARK_0, XA_MARK_1);
assert(ret == 1);
ret = radix_tree_gang_lookup_tag(&tree, (void **)items, 0, BATCH, 1);
assert(ret == 1);