From 0bb911c6a80cf391341756f329a1ee1c51ea7b87 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Fri, 28 Mar 2014 05:42:34 +0800 Subject: [PATCH] mds: don't trim non-auth root inode/dirfrag Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index f972f44e6e3fa..bffc7cc4a0d19 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -6799,7 +6799,7 @@ void MDCache::try_trim_non_auth_subtree(CDir *dir) while (true) { CInode *diri = dir->get_inode(); if (diri->is_base()) { - if (diri->authority().first != mds->whoami) { + if (!diri->is_root() && diri->authority().first != mds->whoami) { dout(10) << " closing empty non-auth subtree " << *dir << dendl; remove_subtree(dir); dir->mark_clean(); -- 2.39.5