From: Zhi Zhang Date: Mon, 9 Oct 2017 06:33:05 +0000 (+0800) Subject: mds: no assertion on inode being purging in find_ino_peers() X-Git-Tag: v13.0.1~399^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e55b2dbfcacb3b5afddba2d2b24c0386a0a48ebb;p=ceph.git mds: no assertion on inode being purging in find_ino_peers() Signed-off-by: Zhi Zhang --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 17e3c4323aa6..b16b62cfa995 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -8813,7 +8813,12 @@ void MDCache::open_ino(inodeno_t ino, int64_t pool, MDSInternalContextBase* fin, void MDCache::find_ino_peers(inodeno_t ino, MDSInternalContextBase *c, mds_rank_t hint) { dout(5) << "find_ino_peers " << ino << " hint " << hint << dendl; - assert(!have_inode(ino)); + CInode *in = get_inode(ino); + if (in && in->state_test(CInode::STATE_PURGING)) { + c->complete(-ESTALE); + return; + } + assert(!in); ceph_tid_t tid = ++find_ino_peer_last_tid; find_ino_peer_info_t& fip = find_ino_peer[tid];