Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
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];