From: Matthew Wilcox (Oracle) Date: Thu, 27 Feb 2020 15:16:09 +0000 (-0500) Subject: maple_tree: Move xa_get_alloc_size X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b57bb806b2b36b8848ba0ba955eb17c46a54d2dc;p=users%2Fjedix%2Flinux-maple.git maple_tree: Move xa_get_alloc_size ... into ma_xa_benchmark. Signed-off-by: Matthew Wilcox (Oracle) --- 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)