Skip to content

Commit dd841a7

Browse files
author
Matthew Wilcox (Oracle)
committed
radix tree test suite: Fix compilation
Introducing local_lock broke compilation; fix it all up. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
1 parent 856deb8 commit dd841a7

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎include/linux/radix-tree.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/bitops.h>
1212
#include <linux/kernel.h>
1313
#include <linux/list.h>
14+
#include <linux/percpu.h>
1415
#include <linux/preempt.h>
1516
#include <linux/rcupdate.h>
1617
#include <linux/spinlock.h>

‎lib/radix-tree.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <linux/kernel.h>
2121
#include <linux/kmemleak.h>
2222
#include <linux/percpu.h>
23-
#include <linux/local_lock.h>
2423
#include <linux/preempt.h> /* in_interrupt() */
2524
#include <linux/radix-tree.h>
2625
#include <linux/rcupdate.h>

‎tools/testing/radix-tree/linux/kernel.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@
2222
#define __releases(x)
2323
#define __must_hold(x)
2424

25+
#define EXPORT_PER_CPU_SYMBOL_GPL(x)
2526
#endif /* _KERNEL_H */
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifndef _LINUX_LOCAL_LOCK
2+
#define _LINUX_LOCAL_LOCK
3+
typedef struct { } local_lock_t;
4+
5+
static inline void local_lock(local_lock_t *lock) { }
6+
static inline void local_unlock(local_lock_t *lock) { }
7+
#define INIT_LOCAL_LOCK(x) { }
8+
#endif

‎tools/testing/radix-tree/test.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,4 @@ int root_tag_get(struct radix_tree_root *root, unsigned int tag);
5656
unsigned long node_maxindex(struct radix_tree_node *);
5757
unsigned long shift_maxindex(unsigned int shift);
5858
int radix_tree_cpu_dead(unsigned int cpu);
59-
struct radix_tree_preload {
60-
unsigned nr;
61-
struct radix_tree_node *nodes;
62-
};
6359
extern struct radix_tree_preload radix_tree_preloads;

0 commit comments

Comments
 (0)