projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2d03d8
)
lru_cache: remove compiled out code
author
Christoph Böhmwalder
<christoph.boehmwalder@linbit.com>
Tue, 22 Nov 2022 13:42:59 +0000
(14:42 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 23 Nov 2022 02:38:39 +0000
(19:38 -0700)
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link:
https://lore.kernel.org/r/20221122134301.69258-3-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/lru_cache.c
patch
|
blob
|
history
diff --git
a/lib/lru_cache.c
b/lib/lru_cache.c
index fec89938623812154b673e81b6c32edafe37fd8e..5dd5e4c00a238f2b48985bd5540546e1de043703 100644
(file)
--- a/
lib/lru_cache.c
+++ b/
lib/lru_cache.c
@@
-60,17
+60,6
@@
int lc_try_lock(struct lru_cache *lc)
} while (unlikely (val == LC_PARANOIA));
/* Spin until no-one is inside a PARANOIA_ENTRY()/RETURN() section. */
return 0 == val;
-#if 0
- /* Alternative approach, spin in case someone enters or leaves a
- * PARANOIA_ENTRY()/RETURN() section. */
- unsigned long old, new, val;
- do {
- old = lc->flags & LC_PARANOIA;
- new = old | LC_LOCKED;
- val = cmpxchg(&lc->flags, old, new);
- } while (unlikely (val == (old ^ LC_PARANOIA)));
- return old == val;
-#endif
}
/**