Skip to content

Commit 729fb74

Browse files
paulmckrcufbq
authored andcommitted
srcu: Document that srcu_{read_lock,down_read}() can share srcu_struct
This commit adds a sentence to the srcu_down_read() function's kernel-doc header noting that it is permissible to use srcu_down_read() and srcu_read_lock() on the same srcu_struct, even concurrently. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andrii Nakryiko <andrii@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Kent Overstreet <kent.overstreet@linux.dev> Cc: <bpf@vger.kernel.org> Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
1 parent dfe442c commit 729fb74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/linux/srcu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,8 @@ srcu_read_lock_notrace(struct srcu_struct *ssp) __acquires(ssp)
359359
* srcu_down_read() nor srcu_up_read() may be invoked from an NMI handler.
360360
*
361361
* Calls to srcu_down_read() may be nested, similar to the manner in
362-
* which calls to down_read() may be nested.
362+
* which calls to down_read() may be nested. The same srcu_struct may be
363+
* used concurrently by srcu_down_read() and srcu_read_lock().
363364
*/
364365
static inline int srcu_down_read(struct srcu_struct *ssp) __acquires(ssp)
365366
{

0 commit comments

Comments
 (0)