From 9e12aa5d3b3757efe7109c055e631b7bfb787871 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Sat, 28 Apr 2018 18:42:03 -0700 Subject: [PATCH] mds: kick rdlock if waiting for dirfragtreelock Fixes: https://tracker.ceph.com/issues/23919 Signed-off-by: Patrick Donnelly --- src/mds/MDCache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 6803eeadee2ff..a471996bc0231 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; -- 2.39.5