srcu: Remove check from srcu_dereference_check()
Subsystems (2)
PATCH 1/1 srcu: Remove check from srcu_dereference_check()
Users of srcu_dereference_check() must hold either an SRCU reader lock or hold the update-side lock. __srcu_read_lock_must_hold() checks whether the SRCU reader lock is held. Since that check is too strict, remove it.
Fixes f0b7ce22d718 ("srcu: Support Clang's context analysis")
Signed-off-by Bart Van Assche <[email protected]>
--- include/linux/srcu.h | 1 - 1 file changed, 1 deletion(-)
include/linux/srcu.h +0 -1
@@ -235,7 +235,6 @@ static inline void __srcu_read_lock_must_hold(const struct srcu_struct *ssp) __m*/ #define srcu_dereference_check (p, ssp, c) \ ({ \ - __srcu_read_lock_must_hold(ssp); \ __acquire_shared_ctx_lock(RCU); \ __auto_type __v = __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ (c) || srcu_read_lock_held(ssp), __rcu); \
Quoted 8 lines · Bart Van Assche
Users of
srcu_dereference_check()must hold either an SRCU reader lock or hold the update-side lock.__srcu_read_lock_must_hold()checks whether the SRCU reader lock is held. Since that check is too strict, remove it.Fixes f0b7ce22d718 ("srcu: Support Clang's context analysis")Signed-off-by Bart Van Assche <[email protected]>
Fair enough:
Acked-by Marco Elver <[email protected]>
Quoted 16 lines
--- include/linux/srcu.h | 1 - 1 file changed, 1 deletion(-)include/linux/srcu.h +0
-1@@ -235,7 +235,6 @@ static inline void __srcu_read_lock_must_hold(const struct srcu_struct *ssp) __m*/ #define srcu_dereference_check (p, ssp, c) \ ({ \ - __srcu_read_lock_must_hold(ssp); \ __acquire_shared_ctx_lock(RCU); \ __auto_type __v = __rcu_dereference_check((p), __UNIQUE_ID(rcu), \ (c) || srcu_read_lock_held(ssp), __rcu); \