]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: Remove the redundant judgement.
authorJianpeng Ma <jianpeng.ma@intel.com>
Fri, 24 Apr 2015 05:28:02 +0000 (13:28 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Mon, 4 May 2015 02:25:14 +0000 (10:25 +0800)
For ObjectExtent, if length == object_size, it mean length=0.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/librbd/internal.cc

index 0f25a2481863b72b61f83d2bef475b2b04a97902..cbb22633d163ccf733592f1a8e7fbd9528053cce 100644 (file)
@@ -3961,7 +3961,7 @@ reprotect_and_return_err:
       AbstractWrite *req;
       c->add_request();
 
-      if (p->offset == 0 && p->length == ictx->layout.fl_object_size) {
+      if (p->length == ictx->layout.fl_object_size) {
        req = new AioRemove(ictx, p->oid.name, p->objectno, snapc, req_comp);
       } else if (p->offset + p->length == ictx->layout.fl_object_size) {
        req = new AioTruncate(ictx, p->oid.name, p->objectno, p->offset, snapc,