From da9683f694c119eef6772f0ab376bfbb601e6ea3 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Mon, 2 Mar 2020 16:09:00 -0500 Subject: [PATCH] maple_tree: no need to rcu_dereference in mtree_empty() Since we're only comparing the value of the pointer to NULL, we don't need to use rcu_dereference(). This is explicitly documented in Documentation/RCU/rcu_dereference.rst. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/maple_tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index a5d75366b24f..9c17fdb72954 100644 --- a/include/linux/maple_tree.h +++ b/include/linux/maple_tree.h @@ -226,7 +226,7 @@ int mtree_store_range(struct maple_tree *mt, unsigned long first, */ static inline bool mtree_empty(const struct maple_tree *mt) { - return rcu_dereference(mt->ma_root) == NULL; + return mt->ma_root == NULL; } /* Advanced API */ -- 2.50.1