From: Paul E. McKenney Date: Fri, 17 Jan 2025 17:14:18 +0000 (-0800) Subject: srcu: Document that srcu_{read_lock,down_read}() can share srcu_struct X-Git-Tag: v6.15-rc1~221^2^4~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=729fb74889d94e6051d6ef2b21c769fe7e54f176;p=thirdparty%2Flinux.git 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 Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: Signed-off-by: Boqun Feng --- diff --git a/include/linux/srcu.h b/include/linux/srcu.h index a0df80baaccf3..317eab82a5f0d 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -359,7 +359,8 @@ srcu_read_lock_notrace(struct srcu_struct *ssp) __acquires(ssp) * srcu_down_read() nor srcu_up_read() may be invoked from an NMI handler. * * Calls to srcu_down_read() may be nested, similar to the manner in - * which calls to down_read() may be nested. + * which calls to down_read() may be nested. The same srcu_struct may be + * used concurrently by srcu_down_read() and srcu_read_lock(). */ static inline int srcu_down_read(struct srcu_struct *ssp) __acquires(ssp) {