diff options
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r-- | include/linux/srcu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 9a323728e60c..d3d5fa54f25e 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -172,6 +172,8 @@ static inline int srcu_read_lock(struct srcu_struct *sp) __acquires(sp) | |||
172 | int retval = __srcu_read_lock(sp); | 172 | int retval = __srcu_read_lock(sp); |
173 | 173 | ||
174 | rcu_lock_acquire(&(sp)->dep_map); | 174 | rcu_lock_acquire(&(sp)->dep_map); |
175 | rcu_lockdep_assert(!rcu_is_cpu_idle(), | ||
176 | "srcu_read_lock() used illegally while idle"); | ||
175 | return retval; | 177 | return retval; |
176 | } | 178 | } |
177 | 179 | ||
@@ -185,6 +187,8 @@ static inline int srcu_read_lock(struct srcu_struct *sp) __acquires(sp) | |||
185 | static inline void srcu_read_unlock(struct srcu_struct *sp, int idx) | 187 | static inline void srcu_read_unlock(struct srcu_struct *sp, int idx) |
186 | __releases(sp) | 188 | __releases(sp) |
187 | { | 189 | { |
190 | rcu_lockdep_assert(!rcu_is_cpu_idle(), | ||
191 | "srcu_read_unlock() used illegally while idle"); | ||
188 | rcu_lock_release(&(sp)->dep_map); | 192 | rcu_lock_release(&(sp)->dep_map); |
189 | __srcu_read_unlock(sp, idx); | 193 | __srcu_read_unlock(sp, idx); |
190 | } | 194 | } |