]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix null pointer deref in resolve on mostly-empty mds
authorSage Weil <sage@newdream.net>
Wed, 3 Mar 2010 17:47:37 +0000 (09:47 -0800)
committerSage Weil <sage@newdream.net>
Wed, 3 Mar 2010 17:47:37 +0000 (09:47 -0800)
We may not have any dirfrags during resolve if the mds crashed
while stopping.

src/mds/MDCache.cc

index 129ffb76abee72b064e61e9b941f426ca7e2fc33..6571dbdf37e4d7212d364a6171c129c2cf516dc4 100644 (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;