mds: fix null pointer deref in resolve on mostly-empty mds

We may not have any dirfrags during resolve if the mds crashed
while stopping.
This commit is contained in:
Sage Weil 2010-03-03 09:47:37 -08:00
parent d844ddee5d
commit 0ee0a8d465

View File

@ -2033,7 +2033,8 @@ void MDCache::resolve_start()
// it owns, so that anything beyond its bounds get left as
// unknown.
CDir *rootdir = root->get_dirfrag(frag_t());
adjust_subtree_auth(rootdir, CDIR_AUTH_UNKNOWN);
if (rootdir)
adjust_subtree_auth(rootdir, CDIR_AUTH_UNKNOWN);
}
set<int> who;