aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2006-12-06 23:40:19 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:44 -0500
commit012d3ca8d85bf3ae5278ba897dd1ca3999247107 (patch)
treec36528a3dff3b5ce5adfdb0f99097e2e1e827df2 /kernel
parenta09c17a6fdad9ae5b5ea1c3383080f84ec76ab20 (diff)
[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: Josh Triplett <josh@freedesktop.org> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/rcutorture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index e2bda18f6f4..c52f981ea00 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -401,7 +401,7 @@ static void srcu_torture_cleanup(void)
401 cleanup_srcu_struct(&srcu_ctl); 401 cleanup_srcu_struct(&srcu_ctl);
402} 402}
403 403
404static int srcu_torture_read_lock(void) 404static int srcu_torture_read_lock(void) __acquires(&srcu_ctl)
405{ 405{
406 return srcu_read_lock(&srcu_ctl); 406 return srcu_read_lock(&srcu_ctl);
407} 407}
@@ -419,7 +419,7 @@ static void srcu_read_delay(struct rcu_random_state *rrsp)
419 schedule_timeout_interruptible(longdelay); 419 schedule_timeout_interruptible(longdelay);
420} 420}
421 421
422static void srcu_torture_read_unlock(int idx) 422static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
423{ 423{
424 srcu_read_unlock(&srcu_ctl, idx); 424 srcu_read_unlock(&srcu_ctl, idx);
425} 425}