]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/fifo: Fix `same_or_later()` comparison
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 11 Nov 2022 01:00:38 +0000 (20:00 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Mon, 9 Jan 2023 23:27:50 +0000 (18:27 -0500)
Fix logic error where disjunction was used instead of conjunction.

Fixes: https://tracker.ceph.com/issues/57562
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit dae8e781452311a2ec32fbf443814e43337294d8)
Fixes: https://tracker.ceph.com/issues/58403
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/cls/fifo/cls_fifo_types.h

index 749f66e7b96e67184377e75495c4777fcf7563c0..0693ae8549b8871b9113f1adf439422c9e9c27b4 100644 (file)
@@ -63,7 +63,7 @@ struct objv {
            ver != rhs.ver);
   }
   bool same_or_later(const objv& rhs) const {
-    return (instance == rhs.instance ||
+    return (instance == rhs.instance &&
            ver >= rhs.ver);
   }