From: root Date: Sun, 12 Nov 2017 08:56:02 +0000 (+0800) Subject: MDS: add null check before we push_back "onfinish" X-Git-Tag: v13.0.1~168^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4954b7ec44480c3820408b6b7ddecf52e4cadc22;p=ceph-ci.git MDS: add null check before we push_back "onfinish" Fix: finish_context does not expect a null pointer, would cause crash. Signed-off-by: dongdong tao --- diff --git a/src/mds/MDSTable.cc b/src/mds/MDSTable.cc index 13a007d29bb..96b51e89296 100644 --- a/src/mds/MDSTable.cc +++ b/src/mds/MDSTable.cc @@ -60,7 +60,8 @@ void MDSTable::save(MDSInternalContextBase *onfinish, version_t v) if (v > 0 && v <= committing_version) { dout(10) << "save v " << version << " - already saving " << committing_version << " >= needed " << v << dendl; - waitfor_save[v].push_back(onfinish); + if (onfinish) + waitfor_save[v].push_back(onfinish); return; }