From b57bb806b2b36b8848ba0ba955eb17c46a54d2dc Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Thu, 27 Feb 2020 10:16:09 -0500 Subject: [PATCH] maple_tree: Move xa_get_alloc_size ... into ma_xa_benchmark. Signed-off-by: Matthew Wilcox (Oracle) --- lib/xarray.c | 6 ------ tools/testing/radix-tree/ma_xa_benchmark.c | 8 ++++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/xarray.c b/lib/xarray.c index 3b2c53507f43..5fa51614802a 100644 --- a/lib/xarray.c +++ b/lib/xarray.c @@ -2294,10 +2294,4 @@ void xa_dump(const struct xarray *xa) shift = xa_to_node(entry)->shift + XA_CHUNK_SHIFT; xa_dump_entry(entry, 0, shift); } - -extern unsigned long kmem_cache_get_alloc(struct kmem_cache *); -unsigned long xa_get_alloc_size(void) -{ - return kmem_cache_get_alloc(radix_tree_node_cachep); -} #endif diff --git a/tools/testing/radix-tree/ma_xa_benchmark.c b/tools/testing/radix-tree/ma_xa_benchmark.c index f6218898cebb..1f7a0c743916 100644 --- a/tools/testing/radix-tree/ma_xa_benchmark.c +++ b/tools/testing/radix-tree/ma_xa_benchmark.c @@ -19,9 +19,13 @@ #include #include +extern unsigned long kmem_cache_get_alloc(struct kmem_cache *); +extern struct kmem_cache *radix_tree_node_cachep; +unsigned long xa_get_alloc_size(void) +{ + return kmem_cache_get_alloc(radix_tree_node_cachep); +} - -extern unsigned long xa_get_alloc_size(void); extern unsigned long mt_get_alloc_size(void); int __weak main(void) -- 2.50.1