lru_cache: use atomic operations when accessing lc->flags, always
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 22 Nov 2022 13:42:58 +0000 (14:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 23 Nov 2022 02:38:39 +0000 (19:38 -0700)
commitf2d03d89615ef65b5dff3aae6581df0b5fcbaa3b
tree23fafdf5532cad8584ae1b6879279f64cbe2d4eb
parentd4b2e0d433769cb7c87e4c93dc048733388d1c46
lru_cache: use atomic operations when accessing lc->flags, always

Or, depending on the way locking is implemented at the call sites,
some updates could be lost (has not been observed).

Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20221122134301.69258-2-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/lru_cache.c