From: Josh Triplett Add an __acquires annotation to srcu_read_lock, and add a __releases annotation to srcu_read_unlock. This allows static analysis tools to detect improperly paired calls to these functions. Signed-off-by: Josh Triplett Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton --- include/linux/srcu.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN include/linux/srcu.h~srcu-3-rcu-variant-permitting-read-side-blocking-srcu-add-lock-annotations include/linux/srcu.h --- a/include/linux/srcu.h~srcu-3-rcu-variant-permitting-read-side-blocking-srcu-add-lock-annotations +++ a/include/linux/srcu.h @@ -42,8 +42,8 @@ struct srcu_struct { void init_srcu_struct(struct srcu_struct *sp); void cleanup_srcu_struct(struct srcu_struct *sp); -int srcu_read_lock(struct srcu_struct *sp); -void srcu_read_unlock(struct srcu_struct *sp, int idx); +int srcu_read_lock(struct srcu_struct *sp) __acquires(sp); +void srcu_read_unlock(struct srcu_struct *sp, int idx) __releases(sp); void synchronize_srcu(struct srcu_struct *sp); long srcu_batches_completed(struct srcu_struct *sp); void cleanup_srcu_struct(struct srcu_struct *sp); _