]> www.infradead.org Git - users/jedix/linux-maple.git/commit
srcu: Guarantee non-negative return value from srcu_read_lock()
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 21 Oct 2024 22:09:39 +0000 (15:09 -0700)
committerUladzislau Rezki (Sony) <urezki@gmail.com>
Sat, 14 Dec 2024 16:13:09 +0000 (17:13 +0100)
commitd465492a224b2409508224cf6970d7b97e2285cc
tree53df4c12beac3e066bc06cc57c8be9367056f5bd
parentfac04efc5c793dccbd07e2d59af9f90b7fc0dca4
srcu: Guarantee non-negative return value from srcu_read_lock()

For almost 20 years, the int return value from srcu_read_lock() has
been always either zero or one.  This commit therefore documents the
fact that it will be non-negative, and does the same for the underlying
__srcu_read_lock().

[ paulmck: Apply Andrii Nakryiko feedback. ]

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
include/linux/srcu.h
kernel/rcu/srcutree.c