]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osdc/ObjectCacher: fix off-by-one error in bh_write_commit()
authorYan, Zheng <zyan@redhat.com>
Thu, 25 Jan 2018 02:25:25 +0000 (10:25 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 25 Jan 2018 02:25:55 +0000 (10:25 +0800)
Fixes: https://tracker.ceph.com/issues/22741
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/osdc/ObjectCacher.cc

index c1664718daef237db2aff4f1a6546717f20f4bf3..3f549f96631c87985a620956a2b1d72853b51669 100644 (file)
@@ -1149,7 +1149,7 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid,
         ++p) {
       BufferHead *bh = p->second;
 
-      if (bh->start() > start+(loff_t)length)
+      if (bh->start() >= start+(loff_t)length)
        break;
 
       if (bh->start() < start &&