From: Jianyu Li Date: Thu, 4 Jan 2018 16:54:30 +0000 (+0800) Subject: Avoid the assert failure when the inode for the cap_export from other MDS happened... X-Git-Tag: v12.2.3~14^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F20300%2Fhead;p=ceph.git Avoid the assert failure when the inode for the cap_export from other MDS happened not in MDCache Signed-off-by: Jianyu Li (cherry picked from commit 82b9b838ae0bd17247f6296f9d7001331f50663c) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 298799f0d952..60045cb1600d 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -4322,7 +4322,7 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak) for (auto p = weak->cap_exports.begin(); p != weak->cap_exports.end(); ++p) { CInode *in = get_inode(p->first); - assert(in && in->is_auth()); + assert(!in || in->is_auth()); // note for (auto q = p->second.begin(); q != p->second.end(); ++q) { dout(10) << " claiming cap import " << p->first << " client." << q->first << dendl;