diff options
| -rw-r--r-- | include/linux/srcu.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 91494d7e8e41..3e72a291c401 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
| @@ -195,6 +195,16 @@ static inline int srcu_read_lock(struct srcu_struct *sp) __acquires(sp) | |||
| 195 | return retval; | 195 | return retval; |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | /* Used by tracing, cannot be traced and cannot invoke lockdep. */ | ||
| 199 | static inline notrace int | ||
| 200 | srcu_read_lock_notrace(struct srcu_struct *sp) __acquires(sp) | ||
| 201 | { | ||
| 202 | int retval; | ||
| 203 | |||
| 204 | retval = __srcu_read_lock(sp); | ||
| 205 | return retval; | ||
| 206 | } | ||
| 207 | |||
| 198 | /** | 208 | /** |
| 199 | * srcu_read_unlock - unregister a old reader from an SRCU-protected structure. | 209 | * srcu_read_unlock - unregister a old reader from an SRCU-protected structure. |
| 200 | * @sp: srcu_struct in which to unregister the old reader. | 210 | * @sp: srcu_struct in which to unregister the old reader. |
| @@ -209,6 +219,13 @@ static inline void srcu_read_unlock(struct srcu_struct *sp, int idx) | |||
| 209 | __srcu_read_unlock(sp, idx); | 219 | __srcu_read_unlock(sp, idx); |
| 210 | } | 220 | } |
| 211 | 221 | ||
| 222 | /* Used by tracing, cannot be traced and cannot call lockdep. */ | ||
| 223 | static inline notrace void | ||
| 224 | srcu_read_unlock_notrace(struct srcu_struct *sp, int idx) __releases(sp) | ||
| 225 | { | ||
| 226 | __srcu_read_unlock(sp, idx); | ||
| 227 | } | ||
| 228 | |||
| 212 | /** | 229 | /** |
| 213 | * smp_mb__after_srcu_read_unlock - ensure full ordering after srcu_read_unlock | 230 | * smp_mb__after_srcu_read_unlock - ensure full ordering after srcu_read_unlock |
| 214 | * | 231 | * |
