diff options
| author | Christian Brauner <brauner@kernel.org> | 2026-07-27 16:20:29 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-07-31 10:09:12 +0200 |
| commit | eace17e646b31f3e38ead8e645240f726e871baf (patch) | |
| tree | 3ffc0323eaa424e49fa31e51160ecbba4048521d /lib | |
| parent | 42c8ed5835921a7b2523517fd6caad1d79b69146 (diff) | |
| parent | b6f946cc42f62b82f014d67bc5eea0662d4f5584 (diff) | |
Merge patch series "lockref tidy ups + touch ups to it's usage by dcache"
Mateusz Guzik <mjguzik@gmail.com> says:
The open-coded check for < 0 indicating a dead object uses information
it should not know, so to speak.
This is a preliminary clean up for a longer term goal of moving dcache
away from lockref into an approach which can atomic_add both ways
instead of suffering the cmpxchg loop.
* patches from https://patch.msgid.link/20260724171422.429284-1-mjguzik@gmail.com:
dcache: use lockref routines for dead count checks
lockref: tidy up dead count handling
Link: https://patch.msgid.link/20260724171422.429284-1-mjguzik@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lockref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lockref.c b/lib/lockref.c index 5d8e3ef3860e..9b3dd688d8cd 100644 --- a/lib/lockref.c +++ b/lib/lockref.c @@ -131,7 +131,7 @@ EXPORT_SYMBOL(lockref_put_or_lock); void lockref_mark_dead(struct lockref *lockref) { assert_spin_locked(&lockref->lock); - lockref->count = -128; + lockref->count = __LOCKREF_DEAD_VAL; } EXPORT_SYMBOL(lockref_mark_dead); |
