From: xie xingguo Date: Mon, 20 Jun 2016 06:47:07 +0000 (+0800) Subject: client: assert filer->zero() to be successful X-Git-Tag: ses5-milestone5~581^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df3690440428abc3085c8888c92aa1263da9f8cc;p=ceph.git client: assert filer->zero() to be successful On error, it will normally be the caller's responsibility to release context, which we don't do it here. Since filer->zero() never returns anything other than 0, we assert this call to be successful for now. Signed-off-by: xie xingguo --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 20ef94e5150..f92d0da3d7c 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -11669,8 +11669,7 @@ int Client::_fallocate(Fh *fh, int mode, int64_t offset, int64_t length) ceph::real_clock::now(cct), 0, true, onfinish, new C_OnFinisher(onsafe, &objecter_finisher)); - if (r < 0) - goto done; + assert(r == 0); in->mtime = ceph_clock_now(cct); mark_caps_dirty(in, CEPH_CAP_FILE_WR);