]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerPrashant D <pdhange@redhat.com>
Fri, 2 Feb 2018 06:25:59 +0000 (01:25 -0500)
Fixes: https://tracker.ceph.com/issues/22741
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit cc4c6dcc2ffdc482f1915db569949e674691c372)

src/osdc/ObjectCacher.cc

index 4afd1de9b6fc16e31f8dc7981a2d7093d0b7aeb5..7139318b9f2ecd72f03e9b74cfdc36f58fdb1cb6 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 &&