Commit b76ba4af authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Linus Torvalds

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()

Fixes: c6400ba7 ("drivers/hwspinlock: fix race between radix tree insertion and lookup")
Signed-off-by: default avatarMatthew Wilcox <>
Cc: Konstantin Khlebnikov <>
Cc: Kirill Shutemov <>
Cc: Jan Kara <>
Cc: Neil Brown <>
Cc: Ross Zwisler <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 6b053b8e
......@@ -313,7 +313,7 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
hwlock = radix_tree_deref_slot(slot);
if (unlikely(!hwlock))
if (radix_tree_is_indirect_ptr(hwlock)) {
if (radix_tree_deref_retry(hwlock)) {
slot = radix_tree_iter_retry(&iter);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment