drivers/hwspinlock: use correct radix tree API
PATCH 129/162 drivers/hwspinlock: use correct radix tree API
From: Matthew Wilcox <[email protected]>
Subject: drivers/hwspinlock: use correct radix tree API
radix_tree_is_indirect_ptr() is an internal API. The correct call to use is radix_tree_deref_retry() which has the appropriate unlikely() annotation.
Fixes c6400ba7e13a ("drivers/hwspinlock: fix race between radix tree insertion and lookup")
Signed-off-by Matthew Wilcox <[email protected]>
Cc Konstantin Khlebnikov <[email protected]>
Cc Kirill Shutemov <[email protected]>
Cc Jan Kara <[email protected]>
Cc Neil Brown <[email protected]>
Cc Ross Zwisler <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/hwspinlock/hwspinlock_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwspinlock/hwspinlock_core.c renamed from drivers/hwspinlock/hwspinlock_core.c~drivers-hwspinlock-use-correct-radix-tree-api +1 -1
@@ -313,7 +313,7 @@ int of_hwspin_lock_get_id(struct device_ hwlock =radix_tree_deref_slot (slot);if (unlikely (!hwlock))continue ; -if (radix_tree_is_indirect_ptr (hwlock)) { +if (radix_tree_deref_retry (hwlock)) { slot =radix_tree_iter_retry (&iter);continue ; }
_