From: Jianpeng Ma Date: Fri, 24 Apr 2015 05:28:02 +0000 (+0800) Subject: librbd: Remove the redundant judgement. X-Git-Tag: v9.0.1~22^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e146b04ba2f3baf4a15ef3e50192507f9656395b;p=ceph.git librbd: Remove the redundant judgement. For ObjectExtent, if length == object_size, it mean length=0. Signed-off-by: Jianpeng Ma --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 0f25a2481863..cbb22633d163 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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,