mds: kick rdlock if waiting for dirfragtreelock

Fixes: https://tracker.ceph.com/issues/23919

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2018-04-28 18:42:03 -07:00
parent 43aaecf84d
commit 9e12aa5d3b
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -6900,8 +6900,9 @@ bool MDCache::trim_inode(CDentry *dn, CInode *in, CDir *con, map<mds_rank_t, MCa
// This is because that unconnected replicas are problematic for
// subtree migration.
//
if (!in->is_auth() && !in->dirfragtreelock.can_read(-1))
if (!in->is_auth() && !mds->locker->rdlock_try(&in->dirfragtreelock, -1, nullptr)) {
return true;
}
// DIR
list<CDir*> dfls;