]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: assert filer->zero() to be successful 9803/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 20 Jun 2016 06:47:07 +0000 (14:47 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 20 Jun 2016 06:47:07 +0000 (14:47 +0800)
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 <xie.xingguo@zte.com.cn>
src/client/Client.cc

index 20ef94e5150b88314fe5f6705a286df81a25b4e8..f92d0da3d7c6caac732922cf2c8e71a69602a769 100644 (file)
@@ -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);