]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Mutation: avoid side-effect of slave_did_prepare() method
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 15 Jun 2016 02:33:36 +0000 (10:33 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 15 Jun 2016 03:40:37 +0000 (11:40 +0800)
We shall check _more does exist first.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mds/Mutation.cc

index 5dd274d4003fc00dfe47439064b67f4475098b83..c5bba00464bf8bad067da20d57bcbddfe005555a 100644 (file)
@@ -204,7 +204,7 @@ bool MDRequestImpl::has_witnesses()
 
 bool MDRequestImpl::slave_did_prepare()
 {
-  return more()->slave_commit;
+  return has_more() && more()->slave_commit;
 }
 
 bool MDRequestImpl::did_ino_allocation()