mirror of
https://github.com/ceph/ceph
synced 2025-01-03 09:32:43 +00:00
shared_cache: use a single lookup for lookup() too
We didn't convert this one to use iterators before. Signed-off-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
parent
cec40dae17
commit
f6771f2004
@ -153,8 +153,9 @@ public:
|
||||
bool retry = false;
|
||||
do {
|
||||
retry = false;
|
||||
if (weak_refs.count(key)) {
|
||||
val = weak_refs[key].lock();
|
||||
typename map<K, WeakVPtr>::iterator i = weak_refs.find(key);
|
||||
if (i != weak_refs.end()) {
|
||||
val = i->second.lock();
|
||||
if (val) {
|
||||
lru_add(key, val, &to_release);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user