From: xie xingguo Date: Wed, 15 Jun 2016 02:33:36 +0000 (+0800) Subject: mds/Mutation: avoid side-effect of slave_did_prepare() method X-Git-Tag: v11.0.0~157^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a9c7cfa56cf7548b76bc19e9c2098f845b931ca9;p=ceph.git mds/Mutation: avoid side-effect of slave_did_prepare() method We shall check _more does exist first. Signed-off-by: xie xingguo --- diff --git a/src/mds/Mutation.cc b/src/mds/Mutation.cc index 5dd274d4003..c5bba00464b 100644 --- a/src/mds/Mutation.cc +++ b/src/mds/Mutation.cc @@ -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()