]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/common/cohort_lru.h
update sources to v12.1.2
[ceph.git] / ceph / src / common / cohort_lru.h
index dd786cfe9c1a3d5fe5021aa740c561c732649900..8d579cb99bbd2aaff2ea1275aad583732395c63b 100644 (file)
@@ -399,7 +399,7 @@ namespace cohort {
          v = lat.p->cache[slot];
          if (v) {
            if (CEQ()(*v, k)) {
-             if (flags & (FLAG_LOCK|FLAG_UNLOCK))
+             if ((flags & FLAG_LOCK) && (flags & FLAG_UNLOCK))
                lat.lock->unlock();
              return v;
            }
@@ -417,7 +417,7 @@ namespace cohort {
            lat.p->cache[slot] = v;
          }
        }
-       if (flags & (FLAG_LOCK|FLAG_UNLOCK))
+       if ((flags & FLAG_LOCK) && (flags & FLAG_UNLOCK))
          lat.lock->unlock();
        return v;
       } /* find_latch */