summaryrefslogtreecommitdiff
path: root/include/linux/maple_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/maple_tree.h')
-rw-r--r--include/linux/maple_tree.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h
index e595ae5cd0ee..691f6012daea 100644
--- a/include/linux/maple_tree.h
+++ b/include/linux/maple_tree.h
@@ -9,6 +9,7 @@
*/
#include <linux/kernel.h>
+#include <linux/compiler.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
@@ -297,7 +298,8 @@ struct maple_tree {
#endif
#define DEFINE_MTREE(name) \
- struct maple_tree name = MTREE_INIT(name, 0)
+ struct maple_tree name = MTREE_INIT(name, 0); \
+ ASSERT_STATIC_STORAGE(name)
#define mtree_lock(mt) spin_lock((&(mt)->ma_lock))
#define mtree_lock_nested(mas, subclass) \
@@ -507,9 +509,13 @@ struct ma_wr_state {
};
#define mas_lock(mas) spin_lock(&((mas)->tree->ma_lock))
+#define mas_lock_irqsave(mas, flags) \
+ spin_lock_irqsave(&((mas)->tree->ma_lock), flags)
#define mas_lock_nested(mas, subclass) \
spin_lock_nested(&((mas)->tree->ma_lock), subclass)
#define mas_unlock(mas) spin_unlock(&((mas)->tree->ma_lock))
+#define mas_unlock_irqrestore(mas, flags) \
+ spin_unlock_irqrestore(&((mas)->tree->ma_lock), flags)
/*
* Special values for ma_state.node.