diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 6803eeadee2..a471996bc02 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -6900,8 +6900,9 @@ bool MDCache::trim_inode(CDentry *dn, CInode *in, CDir *con, mapis_auth() && !in->dirfragtreelock.can_read(-1)) + if (!in->is_auth() && !mds->locker->rdlock_try(&in->dirfragtreelock, -1, nullptr)) { return true; + } // DIR list dfls;