Commit 012d3ca8 authored by Josh Triplett's avatar Josh Triplett Committed by Linus Torvalds

[PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture

The SRCU wrapper functions srcu_torture_read_lock and
srcu_torture_read_unlock in rcutorture intentionally change the SRCU
context; annotate them accordingly, to avoid a warning.
Signed-off-by: default avatarJosh Triplett <josh@freedesktop.org>
Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a09c17a6
...@@ -401,7 +401,7 @@ static void srcu_torture_cleanup(void) ...@@ -401,7 +401,7 @@ static void srcu_torture_cleanup(void)
cleanup_srcu_struct(&srcu_ctl); cleanup_srcu_struct(&srcu_ctl);
} }
static int srcu_torture_read_lock(void) static int srcu_torture_read_lock(void) __acquires(&srcu_ctl)
{ {
return srcu_read_lock(&srcu_ctl); return srcu_read_lock(&srcu_ctl);
} }
...@@ -419,7 +419,7 @@ static void srcu_read_delay(struct rcu_random_state *rrsp) ...@@ -419,7 +419,7 @@ static void srcu_read_delay(struct rcu_random_state *rrsp)
schedule_timeout_interruptible(longdelay); schedule_timeout_interruptible(longdelay);
} }
static void srcu_torture_read_unlock(int idx) static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
{ {
srcu_read_unlock(&srcu_ctl, idx); srcu_read_unlock(&srcu_ctl, idx);
} }
......
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