lockref: tidy up dead count handling

1. put the dead val into a macro so that it can be used in other places
2. __lockref_is_dead():
- drop the __ suffix, this is not an internal routine
- drop the spurious cast, the value is already a signed int
- use READ_ONCE to prevent any compile shenanigans
3. provide lockref_is_dead_or_zero()

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20260724171422.429284-2-mjguzik@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Mateusz Guzik 2026-07-24 19:14:21 +02:00 • committed by Christian Brauner
commit 91e27ed8a3
No known key found for this signature in database
GPG key ID: 91C61BC06578DCA2
9 changed files with 26 additions and 18 deletions